8000 feat: Convert projectConfig module to TS (#653) · piotrski/javascript-sdk@29aed56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29aed56

Browse files
authored
feat: Convert projectConfig module to TS (optimizely#653)
* WIP * WIP Initial conversion with all unit tests pass * WIP * WIP * Define more intefaces * Define the rest of interfaces * Clean up * Clean up * Incorporate comments
1 parent 2387061 commit 29aed56

File tree

8 files changed

+788
-828
lines changed

8 files changed

+788
-828
lines changed

packages/optimizely-sdk/lib/core/bucketer/index.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ import { LogHandler } from '@optimizely/js-sdk-logging';
2323
import {
2424
DecisionResponse,
2525
Experiment,
26-
Variation
26+
Variation,
27+
TrafficAllocation,
28+
Group,
2729
} from '../../shared_types';
2830

2931
import {
@@ -38,17 +40,6 @@ const MAX_TRAFFIC_VALUE = 10000;
3840
const MODULE_NAME = 'BUCKETER';
3941
const RANDOM_POLICY = 'random';
4042

41-
interface TrafficAllocation {
42-
entityId: string;
43-
endOfRange: number;
44-
}
45-
46-
interface Group {
47-
id: string;
48-
policy: string;
49-
trafficAllocation: TrafficAllocation[];
50-
}
51-
5243
interface BucketerParams {
5344
experimentId: string;
5445
experimentKey: string;

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

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

0 commit comments

Comments
 (0)
0