From a1d527cd24778f768147be81d7858187609a09e5 Mon Sep 17 00:00:00 2001 From: Nate Brennand Date: Tue, 16 May 2017 14:24:05 -0700 Subject: [PATCH 1/3] remove double block comment --- index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index e1130c9..9ce377d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -26,7 +26,6 @@ declare module 'ldclient-node' { [key: string]: LDFlagValue, }; - /** /** * LaunchDarkly initialization options. */ From ced197cb0a3e2e471fd02f781bb62ae023bddb84 Mon Sep 17 00:00:00 2001 From: Nate Brennand Date: Tue, 16 May 2017 14:24:20 -0700 Subject: [PATCH 2/3] fix tslint errors --- index.d.ts | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/index.d.ts b/index.d.ts index 9ce377d..c66cdc4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -6,7 +6,7 @@ * Documentation: http://docs.launchdarkly.com/docs/node-sdk-reference */ -declare module 'ldclient-node' { +declare module "ldclient-node" { /** * The LaunchDarkly static global. */ @@ -205,7 +205,7 @@ declare module 'ldclient-node' { * @param args * A sequence of any javascript variables */ - error: (...args: any[]) => void + error: (...args: any[]) => void; /** * The warning logger. @@ -213,7 +213,7 @@ declare module 'ldclient-node' { * @param args * A sequence of any javascript variables */ - warn: (...args: any[]) => void + warn: (...args: any[]) => void; /** * The info logger. @@ -221,7 +221,7 @@ declare module 'ldclient-node' { * @param args * A sequence of any javascript variables */ - info: (...args: any[]) => void + info: (...args: any[]) => void; /** * The debug logger. @@ -229,7 +229,7 @@ declare module 'ldclient-node' { * @param args * A sequence of any javascript variables */ - debug: (...args: any[]) => void + debug: (...args: any[]) => void; } /** @@ -248,7 +248,7 @@ declare module 'ldclient-node' { * @param callback * Will be called with the resulting flag. */ - get: (key: string, callback: (res: LDFlagValue) => void) => void + get: (key: string, callback: (res: LDFlagValue) => void) => void; /** * Get all flags. @@ -256,7 +256,7 @@ declare module 'ldclient-node' { * @param callback * Will be called with the resulting flag set. */ - all: (callback: (err: any, res: LDFlagSet) => void) => void + all: (callback: (err: any, res: LDFlagSet) => void) => void; /** * Initialize the store. @@ -267,7 +267,7 @@ declare module 'ldclient-node' { * @param callback * Will be called when the store has been initialized. */ - init: (flags: LDFlagSet, callback?: () => void) => void + init: (flags: LDFlagSet, callback?: () => void) => void; /** * Delete a key from the store. @@ -282,7 +282,7 @@ declare module 'ldclient-node' { * @param callback * Will be called when the delete operation is complete. */ - delete: (key: string, version: string, callback?: () => void) => void + delete: (key: string, version: string, callback?: () => void) => void; /** * Upsert a flag to the store. @@ -296,7 +296,7 @@ declare module 'ldclient-node' { * @param callback * Will be called after the upsert operation is complete. */ - upsert: (key: string, flag: LDFlag, callback?: () => void) => void + upsert: (key: string, flag: LDFlag, callback?: () => void) => void; /** * Is the store initialized? @@ -308,7 +308,7 @@ declare module 'ldclient-node' { * Truthy if the cache is already initialized. * */ - initialized: (callback?: (err) => void) => bool + initialized: (callback?: (err) => void) => bool; /** * Close the feature store. @@ -316,7 +316,7 @@ declare module 'ldclient-node' { * @returns * The store instance. */ - close: () => LDFeatureStore + close: () => LDFeatureStore; } /** @@ -423,9 +423,6 @@ declare module 'ldclient-node' { * These are flushed periodically (see configuration option: flush_interval) * and when the queue size limit (see configuration option: capacity) is reached. */ - flush: (callback:(err: any, res: boolean) => void) => void; + flush: (callback: (err: any, res: boolean) => void) => void; } - - } - From 25100326a79a57f94fd82f7e6f7a122e7203185a Mon Sep 17 00:00:00 2001 From: Nate Brennand Date: Tue, 16 May 2017 14:25:18 -0700 Subject: [PATCH 3/3] remove extraneous whitespace --- index.d.ts | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/index.d.ts b/index.d.ts index c66cdc4..224424c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -66,7 +66,7 @@ declare module "ldclient-node" { /** * Configures a logger for warnings and errors generated by the SDK. - * + * * This can be a custom logger or an instance of winston.Logger */ logger?: LDLogger | object; @@ -74,7 +74,7 @@ declare module "ldclient-node" { /** * Feature store used by the LaunchDarkly client, defaults to in memory storage. - * + * * The SDK provides an in memory feature store as well as a redis feature store. */ feature_store?: LDFeatureStore; @@ -191,17 +191,17 @@ declare module "ldclient-node" { /** * The LaunchDarkly client logger interface. - * + * * The client will output informational debugging messages to the logger. * Internally, this logger defaults to an instance of winston.Logger, which takes * logs a variadic sequence of variables. * See: https://github.com/winstonjs/winston - * + * */ export interface LDLogger { /** * The error logger. - * + * * @param args * A sequence of any javascript variables */ @@ -209,7 +209,7 @@ declare module "ldclient-node" { /** * The warning logger. - * + * * @param args * A sequence of any javascript variables */ @@ -217,7 +217,7 @@ declare module "ldclient-node" { /** * The info logger. - * + * * @param args * A sequence of any javascript variables */ @@ -225,7 +225,7 @@ declare module "ldclient-node" { /** * The debug logger. - * + * * @param args * A sequence of any javascript variables */ @@ -234,17 +234,17 @@ declare module "ldclient-node" { /** * The LaunchDarkly client feature store. - * + * * The client uses this internally to store flag updates it * receives from LaunchDarkly. */ export interface LDFeatureStore { /** * Get a flag's value. - * + * * @param key * The flag key - * + * * @param callback * Will be called with the resulting flag. */ @@ -252,7 +252,7 @@ declare module "ldclient-node" { /** * Get all flags. - * + * * @param callback * Will be called with the resulting flag set. */ @@ -260,10 +260,10 @@ declare module "ldclient-node" { /** * Initialize the store. - * + * * @param flags * Populate the store with an initial flag set. - * + * * @param callback * Will be called when the store has been initialized. */ @@ -271,14 +271,14 @@ declare module "ldclient-node" { /** * Delete a key from the store. - * + * * @param key * The flag key. - * + * * @param version * The next version to increment the flag. The store should not update * a newer version with an older version. - * + * * @param callback * Will be called when the delete operation is complete. */ @@ -286,13 +286,13 @@ declare module "ldclient-node" { /** * Upsert a flag to the store. - * + * * @param key * The flag key. - * + * * @param flag * The feature flag for the corresponding key. - * + * * @param callback * Will be called after the upsert operation is complete. */ @@ -300,19 +300,19 @@ declare module "ldclient-node" { /** * Is the store initialized? - * + * * @param callback * Will be called when the store is initialized. - * + * * @returns * Truthy if the cache is already initialized. - * + * */ initialized: (callback?: (err) => void) => bool; /** * Close the feature store. - * + * * @returns * The store instance. */ @@ -365,7 +365,7 @@ declare module "ldclient-node" { /** * * The secure_mode_hash method computes an HMAC signature of a user signed with the client's SDK key. - * + * * If you're using our JavaScript SDK for client-side flags, this * method generates the signature you need for secure mode. * @@ -382,7 +382,7 @@ declare module "ldclient-node" { /** - * + * * @returns Whether the client is configured in offline mode. */ is_offline: () => boolean; @@ -418,7 +418,7 @@ declare module "ldclient-node" { /** * Flush the queue - * + * * Internally, the LaunchDarkly SDK keeps an event queue for track and identify calls. * These are flushed periodically (see configuration option: flush_interval) * and when the queue size limit (see configuration option: capacity) is reached.