Skip to content

Commit 1ff25b5

Browse files
committed
remove obselete validation
1 parent 69e3f6f commit 1ff25b5

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/utils/config_validator/index.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,7 @@ const SUPPORTED_VERSIONS = [DATAFILE_VERSIONS.V2, DATAFILE_VERSIONS.V3, DATAFILE
4343
export const validate = function(config: unknown): boolean {
4444
if (typeof config === 'object' && config !== null) {
4545
const configObj = config as ObjectWithUnknownProperties;
46-
const errorHandler = configObj['errorHandler'];
47-
const eventDispatcher = configObj['eventDispatcher'];
48-
const logger = configObj['logger'];
49-
if (errorHandler && typeof (errorHandler as ObjectWithUnknownProperties)['handleError'] !== 'function') {
50-
throw new OptimizelyError(INVALID_ERROR_HANDLER);
51-
}
52-
if (eventDispatcher && typeof (eventDispatcher as ObjectWithUnknownProperties)['dispatchEvent'] !== 'function') {
53-
throw new OptimizelyError(INVALID_EVENT_DISPATCHER);
54-
}
55-
if (logger && typeof (logger as ObjectWithUnknownProperties)['info'] !== 'function') {
56-
throw new OptimizelyError(INVALID_LOGGER);
57-
}
46+
// TODO: add validation
5847
return true;
5948
}
6049
throw new OptimizelyError(INVALID_CONFIG);

0 commit comments

Comments
 (0)