Skip to content

Commit cd54074

Browse files
Fix comments in type definitions
1 parent 3342882 commit cd54074

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

types/splitio.d.ts

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,17 @@ interface ISharedSettings {
6666
*
6767
* @example
6868
* ```
69-
* const getHeaderOverrides = (context) => {
70-
* return {
71-
* 'Authorization': context.headers['Authorization'] + ', other-value',
72-
* 'custom-header': 'custom-value'
73-
* };
74-
* };
69+
* const factory = SplitFactory({
70+
* ...
71+
* sync: {
72+
* getHeaderOverrides(context) {
73+
* return {
74+
* 'Authorization': context.headers['Authorization'] + ', other-value',
75+
* 'custom-header': 'custom-value'
76+
* };
77+
* }
78+
* }
79+
* });
7580
* ```
7681
*/
7782
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>;
@@ -952,7 +957,7 @@ declare namespace SplitIO {
952957
*/
953958
prefix?: string;
954959
/**
955-
* Number of days before cached data expires if it was not updated. If cache expires, it is cleared on initialization.
960+
* Number of days before cached data expires if it was not successfully synchronized (i.e., last SDK_READY or SDK_UPDATE event emitted). If cache expires, it is cleared on initialization.
956961
*
957962
* @defaultValue `10`
958963
*/
@@ -1292,7 +1297,7 @@ declare namespace SplitIO {
12921297
*/
12931298
prefix?: string;
12941299
/**
1295-
* Optional settings for the 'LOCALSTORAGE' storage type. It specifies the number of days before cached data expires if it was not updated. If cache expires, it is cleared on initialization.
1300+
* Optional settings for the 'LOCALSTORAGE' storage type. It specifies the number of days before cached data expires if it was not successfully synchronized (i.e., last SDK_READY or SDK_UPDATE event emitted). If cache expires, it is cleared on initialization.
12961301
*
12971302
* @defaultValue `10`
12981303
*/
@@ -1350,12 +1355,17 @@ declare namespace SplitIO {
13501355
*
13511356
* @example
13521357
* ```
1353-
* const getHeaderOverrides = (context) => {
1354-
* return {
1355-
* 'Authorization': context.headers['Authorization'] + ', other-value',
1356-
* 'custom-header': 'custom-value'
1357-
* };
1358-
* };
1358+
* const factory = SplitFactory({
1359+
* ...
1360+
* sync: {
1361+
* getHeaderOverrides(context) {
1362+
* return {
1363+
* 'Authorization': context.headers['Authorization'] + ', other-value',
1364+
* 'custom-header': 'custom-value'
1365+
* };
1366+
* }
1367+
* }
1368+
* });
13591369
* ```
13601370
*/
13611371
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>;

0 commit comments

Comments
 (0)