diff --git a/ldclient-js/ldclient-js-tests.ts b/ldclient-js/ldclient-js-tests.ts index 2e304187dd..cf4ec2b2b6 100644 --- a/ldclient-js/ldclient-js-tests.ts +++ b/ldclient-js/ldclient-js-tests.ts @@ -6,6 +6,9 @@ const ldClient = LDClient.initialize( { key: 'USER KEY', name: 'USER NAME', + custom: { + 'CUSTOM ATTRIBUTE': ['CUSTOM VALUE'], + }, }, { hash: 'SECURE USER HASH', diff --git a/ldclient-js/ldclient-js.d.ts b/ldclient-js/ldclient-js.d.ts index 1a0ae97550..47792db29a 100644 --- a/ldclient-js/ldclient-js.d.ts +++ b/ldclient-js/ldclient-js.d.ts @@ -131,7 +131,9 @@ declare namespace LaunchDarkly { /** * Any additional attributes associated with the user. */ - custom?: string | boolean | number | Array; + custom?: { + [key: string]: string | boolean | number | Array, + }; } /**