Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit b86d3fd

Browse files
authored
Merge pull request #136 from launchdarkly/yus/sc-186251/add-application-type-to-rn-sdk
[sc-186251] Added Application types
2 parents 9cf8f74 + 9707c0e commit b86d3fd

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

index.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,31 @@ declare module 'launchdarkly-react-native-client-sdk' {
1212
* Configuration options for the LaunchDarkly React Native SDK.
1313
*/
1414
export type LDConfig = {
15+
/**
16+
* Information about the application where the LaunchDarkly SDK is running.
17+
*/
18+
application?: {
19+
/**
20+
* A unique identifier representing the application where the LaunchDarkly SDK is running.
21+
*
22+
* This can be specified as any string value as long as it only uses the following characters: ASCII letters,
23+
* ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.
24+
*
25+
* Example: `authentication-service`
26+
*/
27+
id?: string;
28+
29+
/**
30+
* A unique identifier representing the version of the application where the LaunchDarkly SDK is running.
31+
*
32+
* This can be specified as any string value as long as it only uses the following characters: ASCII letters,
33+
* ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.
34+
*
35+
* Example: `1.0.0` (standard version string) or `abcdef` (sha prefix)
36+
*/
37+
version?: string;
38+
};
39+
1540
/**
1641
* The mobile SDK key associated with your LaunchDarkly environment.
1742
*

test-types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ async function tests() {
2727
mobileKey: '',
2828
};
2929
const configWithAllOptions: LDConfig = {
30+
application: {
31+
id: 'rn-unit-test',
32+
version: '0.0.1',
33+
},
3034
mobileKey: '',
3135
pollUri: '',
3236
streamUri: '',

0 commit comments

Comments
 (0)