Skip to content

Commit ce4a44f

Browse files
style: revert code formatting changes
1 parent dd1a828 commit ce4a44f

File tree

2 files changed

+113
-116
lines changed

2 files changed

+113
-116
lines changed

test-types.ts

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
// This file exists only so that we can run the TypeScript compiler in the CI build
23
// to validate our typings.d.ts file.
34

@@ -17,14 +18,14 @@ var user: ld.LDContext = {
1718
country: 'us',
1819
anonymous: true,
1920
custom: {
20-
a: 's',
21-
b: true,
22-
c: 3,
23-
d: ['x', 'y'],
24-
e: [true, false],
25-
f: [1, 2],
21+
'a': 's',
22+
'b': true,
23+
'c': 3,
24+
'd': [ 'x', 'y' ],
25+
'e': [ true, false ],
26+
'f': [ 1, 2 ]
2627
},
27-
privateAttributeNames: ['name', 'email'],
28+
privateAttributeNames: [ 'name', 'email' ]
2829
};
2930
const hook: ld.Hook = {
3031
getMetadata: () => ({
@@ -34,66 +35,59 @@ const hook: ld.Hook = {
3435
beforeEvaluation(hookContext: ld.EvaluationSeriesContext, data: ld.EvaluationSeriesData): ld.EvaluationSeriesData {
3536
return data;
3637
},
37-
afterEvaluation(
38-
hookContext: ld.EvaluationSeriesContext,
39-
data: ld.EvaluationSeriesData,
40-
detail: ld.LDEvaluationDetail
41-
): ld.EvaluationSeriesData {
38+
afterEvaluation(hookContext: ld.EvaluationSeriesContext, data: ld.EvaluationSeriesData, detail: ld.LDEvaluationDetail): ld.EvaluationSeriesData {
4239
return data;
4340
},
4441
beforeIdentify(hookContext: ld.IdentifySeriesContext, data: ld.IdentifySeriesData): ld.IdentifySeriesData {
4542
return data;
4643
},
47-
afterIdentify(
48-
hookContext: ld.IdentifySeriesContext,
49-
data: ld.IdentifySeriesData,
50-
result: ld.IdentifySeriesResult
51-
): ld.IdentifySeriesData {
44+
afterIdentify(hookContext: ld.IdentifySeriesContext, data: ld.IdentifySeriesData, result: ld.IdentifySeriesResult): ld.IdentifySeriesData {
5245
return data;
5346
},
5447

55-
afterTrack(hookContext: ld.TrackSeriesContext): void {},
48+
afterTrack(hookContext: ld.TrackSeriesContext): void {
49+
}
5650
};
5751

5852
const plugin: ld.LDPlugin = {
5953
getMetadata: () => ({
6054
name: 'plugin',
6155
}),
62-
register(client: ld.LDClientBase, environmentMetadata: ld.LDPluginEnvironmentMetadata): void {},
56+
register(client: ld.LDClientBase, environmentMetadata: ld.LDPluginEnvironmentMetadata): void {
57+
},
6358
registerDebug(debugOverride: ld.LDDebugOverride): void {},
64-
6559
getHooks(metadata: ld.LDPluginEnvironmentMetadata): ld.Hook[] {
6660
return [];
6761
},
6862
};
6963

7064
var logger: ld.LDLogger = ld.commonBasicLogger({ level: 'info' });
7165
var allBaseOptions: ld.LDOptionsBase = {
72-
bootstrap: {},
66+
bootstrap: { },
7367
baseUrl: '',
7468
eventsUrl: '',
7569
streamUrl: '',
7670
streaming: true,
7771
useReport: true,
7872
sendLDHeaders: true,
79-
requestHeaderTransform: x => x,
73+
requestHeaderTransform: (x) => x,
8074
evaluationReasons: true,
8175
sendEvents: true,
8276
allAttributesPrivate: true,
83-
privateAttributes: ['x'],
77+
privateAttributes: [ 'x' ],
8478
sendEventsOnlyForVariation: true,
8579
flushInterval: 1,
8680
streamReconnectDelay: 1,
8781
logger: logger,
8882
application: {
8983
version: 'version',
90-
id: 'id',
84+
id: 'id'
9185
},
92-
hooks: [hook],
93-
plugins: [plugin],
86+
hooks: [ hook ],
87+
plugins: [ plugin ]
9488
};
9589

96-
var client: ld.LDClientBase = {} as ld.LDClientBase; // wouldn't do this in real life, it's just so the following statements will compile
90+
var client: ld.LDClientBase = {} as ld.LDClientBase; // wouldn't do this in real life, it's just so the following statements will compile
9791

9892
client.waitUntilReady().then(() => {});
9993
client.waitForInitialization(5).then(() => {});
@@ -110,7 +104,7 @@ client.flush().then(() => {});
110104
var boolFlagValue: ld.LDFlagValue = client.variation('key', false);
111105
var numberFlagValue: ld.LDFlagValue = client.variation('key', 2);
112106
var stringFlagValue: ld.LDFlagValue = client.variation('key', 'default');
113-
var jsonFlagValue: ld.LDFlagValue = client.variation('key', ['a', 'b']);
107+
var jsonFlagValue: ld.LDFlagValue = client.variation('key', [ 'a', 'b' ]);
114108

115109
var detail: ld.LDEvaluationDetail = client.variationDetail('key', 'default');
116110
var detailValue: ld.LDFlagValue = detail.value;

0 commit comments

Comments
 (0)