Skip to content

Commit ff034eb

Browse files
committed
declraration
1 parent cc266fe commit ff034eb

File tree

100 files changed

+221
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+221
-100
lines changed

lib/client_factory.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import { Platform } from './platform_support';
1617
import { Config } from "./shared_types";
1718
import { extractLogger } from "./logging/logger_factory";
1819
import { extractErrorNotifier } from "./error/error_notifier_factory";
@@ -29,7 +30,7 @@ import { InMemoryLruCache } from "./utils/cache/in_memory_lru_cache";
2930
import { transformCache, CacheWithRemove } from "./utils/cache/cache";
3031
import { ConstantBackoff } from "./utils/repeater/repeater";
3132

32-
export const __platforms = ['__universal__'];
33+
export const __platforms: Platform[] = ['__universal__'];
3334

3435
export type OptimizelyFactoryConfig = Config & {
3536
requestHandler: RequestHandler;

lib/common_exports.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Platform } from './platform_support';
2+
13
/**
24
* Copyright 2023-2025 Optimizely
35
*
@@ -14,7 +16,7 @@
1416
* limitations under the License.
1517
*/
1618

17-
export const __platforms = ['__universal__'];
19+
export const __platforms: Platform[] = ['__universal__'];
1820

1921
export { createStaticProjectConfigManager } from './project_config/config_manager_factory';
2022

lib/core/audience_evaluator/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import { Platform } from './../../platform_support';
1617
import * as conditionTreeEvaluator from '../condition_tree_evaluator';
1718
import * as customAttributeConditionEvaluator from '../custom_attribute_condition_evaluator';
1819
import * as odpSegmentsConditionEvaluator from './odp_segment_condition_evaluator';
@@ -21,7 +22,7 @@ import { CONDITION_EVALUATOR_ERROR, UNKNOWN_CONDITION_TYPE } from 'error_message
2122
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE} from 'log_message';
2223
import { LoggerFacade } from '../../logging/logger';
2324

24-
export const __platforms = ['__universal__'];
25+
export const __platforms: Platform[] = ['__universal__'];
2526

2627
export class AudienceEvaluator {
2728
private logger?: LoggerFacade;

lib/core/audience_evaluator/odp_segment_condition_evaluator/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
* See the License for the specific language governing permissions and *
1414
* limitations under the License. *
1515
***************************************************************************/
16+
import { Platform } from './../../../platform_support';
1617
import { UNKNOWN_MATCH_TYPE } from 'error_message';
1718
import { LoggerFacade } from '../../../logging/logger';
1819
import { Condition, OptimizelyUserContext } from '../../../shared_types';
1920

20-
export const __platforms = ['__universal__'];
21+
export const __platforms: Platform[] = ['__universal__'];
2122

2223
const QUALIFIED_MATCH_TYPE = 'qualified';
2324

lib/core/bucketer/bucket_value_generator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import { Platform } from './../../platform_support';
1617
import murmurhash from 'murmurhash';
1718
import { INVALID_BUCKETING_ID } from 'error_message';
1819
import { OptimizelyError } from '../../error/optimizly_error';
1920

20-
export const __platforms = ['__universal__'];
21+
export const __platforms: Platform[] = ['__universal__'];
2122

2223
const HASH_SEED = 1;
2324
const MAX_HASH_VALUE = Math.pow(2, 32);

lib/core/bucketer/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* Bucketer API for determining the variation id from the specified parameters
1919
*/
20+
import { Platform } from './../../platform_support';
2021
import { LoggerFacade } from '../../logging/logger';
2122
import {
2223
DecisionResponse,
@@ -29,7 +30,7 @@ import { OptimizelyError } from '../../error/optimizly_error';
2930
import { generateBucketValue } from './bucket_value_generator';
3031
import { DecisionReason } from '../decision_service';
3132

32-
export const __platforms = ['__universal__'];
33+
export const __platforms: Platform[] = ['__universal__'];
3334

3435
export const USER_NOT_IN_ANY_EXPERIMENT = 'User %s is not in any experiment of group %s.';
3536
export const USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP = 'User %s is not in experiment %s of group %s.';

lib/core/condition_tree_evaluator/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Platform } from './../../platform_support';
2+
13
/****************************************************************************
24
* Copyright 2018, 2021, Optimizely, Inc. and contributors *
35
* *
@@ -14,7 +16,7 @@
1416
* limitations under the License. *
1517
***************************************************************************/
1618

17-
export const __platforms = ['__universal__'];
19+
export const __platforms: Platform[] = ['__universal__'];
1820

1921
const AND_CONDITION = 'and';
2022
const OR_CONDITION = 'or';

lib/core/custom_attribute_condition_evaluator/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
* See the License for the specific language governing permissions and *
1414
* limitations under the License. *
1515
***************************************************************************/
16-
export const __platforms = ['__universal__'];
16+
export const __platforms: Platform[] = ['__universal__'];
1717

18+
import { Platform } from './../../platform_support';
1819
import { Condition, OptimizelyUserContext } from '../../shared_types';
1920

2021
import fns from '../../utils/fns';

lib/core/decision/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { Platform } from './../../platform_support';
1718
import { DecisionObj } from '../decision_service';
1819

1920
/**
2021
* Get experiment key from the provided decision object
2122
* @param {DecisionObj} decisionObj Object representing decision
2223
* @returns {string} Experiment key or empty string if experiment is null
2324
*/
24-
export const __platforms = ['__universal__'];
25+
export const __platforms: Platform[] = ['__universal__'];
2526

2627

2728
export function getExperimentKey(decisionObj: DecisionObj): string {

lib/core/decision_service/cmab/cmab_client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { Platform } from './../../../platform_support';
1718
import { OptimizelyError } from "../../../error/optimizly_error";
1819
import { CMAB_FETCH_FAILED, INVALID_CMAB_FETCH_RESPONSE } from "../../../message/error_message";
1920
import { UserAttributes } from "../../../shared_types";
@@ -24,7 +25,7 @@ import { isSuccessStatusCode } from "../../../utils/http_request_handler/http_ut
2425
import { BackoffController } from "../../../utils/repeater/repeater";
2526
import { Producer } from "../../../utils/type";
2627

27-
export const __platforms = ['__universal__'];
28+
export const __platforms: Platform[] = ['__universal__'];
2829

2930
export interface CmabClient {
3031
fetchDecision(

0 commit comments

Comments
 (0)