Skip to content

Commit 41f6c7e

Browse files
authored
feat: Convert notification center to TS (#624)
* Conver notification center to TS and fix tests * Correct Copyright year * Clean up * Fix imports and create NotificationListeners type * Clean up * Remove unneccesary exports * Avoid `as` when using indexOf on return value of objectValues
1 parent a0157fd commit 41f6c7e

File tree

6 files changed

+251
-303
lines changed

6 files changed

+251
-303
lines changed

packages/optimizely-sdk/lib/core/notification_center/index.d.ts

Lines changed: 0 additions & 90 deletions
This file was deleted.

packages/optimizely-sdk/lib/core/notification_center/index.js

Lines changed: 0 additions & 204 deletions
This file was deleted.

packages/optimizely-sdk/lib/core/notification_center/index.tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import sinon from 'sinon';
1717
import { assert } from 'chai';
1818

19-
import NotificationCenter from './';
19+
import { createNotificationCenter } from './';
2020
import * as enums from '../../utils/enums';
2121
import logger from '../../plugins/logger';
2222
import errorHandler from '../../plugins/error_handler';
@@ -37,7 +37,7 @@ describe('lib/core/notification_center', function() {
3737
mockLoggerStub = sandbox.stub(mockLogger, 'log');
3838
mockErrorHandlerStub = sandbox.stub(mockErrorHandler, 'handleError');
3939

40-
notificationCenterInstance = NotificationCenter.createNotificationCenter({
40+
notificationCenterInstance = createNotificationCenter({
4141
logger: mockLoggerStub,
4242
errorHandler: mockErrorHandlerStub,
4343
});

0 commit comments

Comments
 (0)