From e08bd191cd1ad565d55b6f4c43ef227fa097a68e Mon Sep 17 00:00:00 2001 From: IceCreamYou Date: Thu, 13 Oct 2016 13:21:08 -0700 Subject: [PATCH] Fixed custom user attribute types --- ldclient-js/ldclient-js-tests.ts | 3 +++ ldclient-js/ldclient-js.d.ts | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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, + }; } /**