@@ -18,19 +18,19 @@ declare module 'ldclient-js-common' {
18
18
/**
19
19
* A map of feature flags from their keys to their values.
20
20
*/
21
- export type LDFlagSet = {
21
+ export interface LDFlagSet {
22
22
[ key : string ] : LDFlagValue ;
23
- } ;
23
+ }
24
24
25
25
/**
26
26
* A map of feature flag keys to objects holding changes in their values.
27
27
*/
28
- export type LDFlagChangeset = {
28
+ export interface LDFlagChangeset {
29
29
[ key : string ] : {
30
30
current : LDFlagValue ;
31
31
previous : LDFlagValue ;
32
32
} ;
33
- } ;
33
+ }
34
34
35
35
/**
36
36
* The minimal interface for any object that LDClient can use for logging.
@@ -154,15 +154,16 @@ declare module 'ldclient-js-common' {
154
154
155
155
/**
156
156
* Whether all user attributes (except the user key) should be marked as private, and
157
- * not sent to LaunchDarkly.
157
+ * not sent to LaunchDarkly in analytics events .
158
158
*
159
159
* By default, this is false.
160
160
*/
161
161
allAttributesPrivate ?: boolean ;
162
162
163
163
/**
164
164
* The names of user attributes that should be marked as private, and not sent
165
- * to LaunchDarkly.
165
+ * to LaunchDarkly in analytics events. You can also specify this on a per-user basis
166
+ * with [[LDUser.privateAttributeNames]].
166
167
*/
167
168
privateAttributeNames ?: Array < string > ;
168
169
@@ -211,7 +212,7 @@ declare module 'ldclient-js-common' {
211
212
/**
212
213
* A LaunchDarkly user object.
213
214
*/
214
- export type LDUser = {
215
+ export interface LDUser {
215
216
/**
216
217
* A unique string identifying a user.
217
218
*/
@@ -268,13 +269,21 @@ declare module 'ldclient-js-common' {
268
269
custom ?: {
269
270
[ key : string ] : string | boolean | number | Array < string | boolean | number > ;
270
271
} ;
272
+
273
+ /**
274
+ * Specifies a list of attribute names (either built-in or custom) which should be
275
+ * marked as private, and not sent to LaunchDarkly in analytics events. This is in
276
+ * addition to any private attributes designated in the global configuration
277
+ * with [[LDOptions.privateAttributeNames]] or [[LDOptions.allAttributesPrivate]].
278
+ */
279
+ privateAttributeNames ?: Array < string > ;
271
280
}
272
281
273
282
/**
274
283
* Describes the reason that a flag evaluation produced a particular value. This is
275
284
* part of the [[LDEvaluationDetail]] object returned by [[LDClient.variationDetail]].
276
285
*/
277
- export type LDEvaluationReason = {
286
+ export interface LDEvaluationReason {
278
287
/**
279
288
* The general category of the reason:
280
289
*
@@ -308,7 +317,7 @@ declare module 'ldclient-js-common' {
308
317
* The key of the failed prerequisite flag, if the kind was `'PREREQUISITE_FAILED'`.
309
318
*/
310
319
prerequisiteKey ?: string ;
311
- } ;
320
+ }
312
321
313
322
/**
314
323
* An object that combines the result of a feature flag evaluation with information about
@@ -318,7 +327,7 @@ declare module 'ldclient-js-common' {
318
327
*
319
328
* For more information, see the [SDK reference guide](https://docs.launchdarkly.com/docs/evaluation-reasons).
320
329
*/
321
- export type LDEvaluationDetail = {
330
+ export interface LDEvaluationDetail {
322
331
/**
323
332
* The result of the flag evaluation. This will be either one of the flag's variations or
324
333
* the default value that was passed to [[LDClient.variationDetail]].
@@ -335,7 +344,7 @@ declare module 'ldclient-js-common' {
335
344
* An object describing the main factor that influenced the flag evaluation value.
336
345
*/
337
346
reason : LDEvaluationReason ;
338
- } ;
347
+ }
339
348
340
349
/**
341
350
* The basic interface for the LaunchDarkly client. The browser SDK and the Electron SDK both
0 commit comments