Skip to content

Commit ba0a152

Browse files
authored
feat: create precomputedInit (#102)
* Add tests for precomputed init * Update js common dependency * Fix import * v3.7.1-alpha.0 * Export getPrecomputedInstance method * Docs updates * v3.7.1-alpha.1 * v3.8.0
1 parent 08b97b3 commit ba0a152

31 files changed

+584
-167
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [getBooleanAssignment](./js-client-sdk.eppoprecomputedjsclient.getbooleanassignment.md)
4+
5+
## EppoPrecomputedJSClient.getBooleanAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getBooleanAssignment(flagKey: string, defaultValue: boolean): boolean;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| defaultValue | boolean | |
19+
20+
**Returns:**
21+
22+
boolean
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [getIntegerAssignment](./js-client-sdk.eppoprecomputedjsclient.getintegerassignment.md)
4+
5+
## EppoPrecomputedJSClient.getIntegerAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getIntegerAssignment(flagKey: string, defaultValue: number): number;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| defaultValue | number | |
19+
20+
**Returns:**
21+
22+
number
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [getJSONAssignment](./js-client-sdk.eppoprecomputedjsclient.getjsonassignment.md)
4+
5+
## EppoPrecomputedJSClient.getJSONAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getJSONAssignment(flagKey: string, defaultValue: object): object;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| defaultValue | object | |
19+
20+
**Returns:**
21+
22+
object
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [getNumericAssignment](./js-client-sdk.eppoprecomputedjsclient.getnumericassignment.md)
4+
5+
## EppoPrecomputedJSClient.getNumericAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getNumericAssignment(flagKey: string, defaultValue: number): number;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| defaultValue | number | |
19+
20+
**Returns:**
21+
22+
number
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [getStringAssignment](./js-client-sdk.eppoprecomputedjsclient.getstringassignment.md)
4+
5+
## EppoPrecomputedJSClient.getStringAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getStringAssignment(flagKey: string, defaultValue: string): string;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| defaultValue | string | |
19+
20+
**Returns:**
21+
22+
string
23+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [initialized](./js-client-sdk.eppoprecomputedjsclient.initialized.md)
4+
5+
## EppoPrecomputedJSClient.initialized property
6+
7+
**Signature:**
8+
9+
```typescript
10+
static initialized: boolean;
11+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) &gt; [instance](./js-client-sdk.eppoprecomputedjsclient.instance.md)
4+
5+
## EppoPrecomputedJSClient.instance property
6+
7+
**Signature:**
8+
9+
```typescript
10+
static instance: EppoPrecomputedJSClient;
11+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md)
4+
5+
## EppoPrecomputedJSClient class
6+
7+
Client for assigning precomputed experiment variations.
8+
9+
**Signature:**
10+
11+
```typescript
12+
export declare class EppoPrecomputedJSClient extends EppoPrecomputedClient
13+
```
14+
**Extends:** EppoPrecomputedClient
15+
16+
## Properties
17+
18+
| Property | Modifiers | Type | Description |
19+
| --- | --- | --- | --- |
20+
| [initialized](./js-client-sdk.eppoprecomputedjsclient.initialized.md) | <code>static</code> | boolean | |
21+
| [instance](./js-client-sdk.eppoprecomputedjsclient.instance.md) | <code>static</code> | [EppoPrecomputedJSClient](./js-client-sdk.eppoprecomputedjsclient.md) | |
22+
23+
## Methods
24+
25+
| Method | Modifiers | Description |
26+
| --- | --- | --- |
27+
| [getBooleanAssignment(flagKey, defaultValue)](./js-client-sdk.eppoprecomputedjsclient.getbooleanassignment.md) | | |
28+
| [getIntegerAssignment(flagKey, defaultValue)](./js-client-sdk.eppoprecomputedjsclient.getintegerassignment.md) | | |
29+
| [getJSONAssignment(flagKey, defaultValue)](./js-client-sdk.eppoprecomputedjsclient.getjsonassignment.md) | | |
30+
| [getNumericAssignment(flagKey, defaultValue)](./js-client-sdk.eppoprecomputedjsclient.getnumericassignment.md) | | |
31+
| [getStringAssignment(flagKey, defaultValue)](./js-client-sdk.eppoprecomputedjsclient.getstringassignment.md) | | |
32+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [getPrecomputedInstance](./js-client-sdk.getprecomputedinstance.md)
4+
5+
## getPrecomputedInstance() function
6+
7+
Used to access a singleton SDK precomputed client instance. Use the method after calling precomputedInit() to initialize the client.
8+
9+
**Signature:**
10+
11+
```typescript
12+
export declare function getPrecomputedInstance(): EppoPrecomputedClient;
13+
```
14+
**Returns:**
15+
16+
EppoPrecomputedClient
17+
18+
a singleton precomputed client instance
19+

docs/js-client-sdk.iclientconfig.apikey.md

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

0 commit comments

Comments
 (0)