Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// This file exists only so that we can run the TypeScript compiler in the CI build
// to validate our typings.d.ts file. The code will not actually be run.
import * as ld from 'launchdarkly-js-sdk-common';
const ver: string = ld.version;
const logger: ld.LDLogger = ld.createConsoleLogger("info");
const loggerWithPrefix: ld.LDLogger = ld.createConsoleLogger("info", "prefix");
const userWithKeyOnly: ld.LDUser = { key: 'user' };
const anonUserWithNoKey: ld.LDUser = { anonymous: true };
const user: ld.LDUser = {
key: 'user',
secondary: 'otherkey',
name: 'name',
firstName: 'first',
lastName: 'last',
email: 'test@example.com',
avatar: 'http://avatar.url',
ip: '1.1.1.1',
country: 'us',
anonymous: true,
custom: {
'a': 's',
'b': true,
// This file exists only so that we can run the TypeScript compiler in the CI build
// to validate our typings.d.ts file. The code will not actually be run.
import * as ld from 'launchdarkly-js-sdk-common';
const ver: string = ld.version;
const logger: ld.LDLogger = ld.createConsoleLogger("info");
const loggerWithPrefix: ld.LDLogger = ld.createConsoleLogger("info", "prefix");
const userWithKeyOnly: ld.LDUser = { key: 'user' };
const anonUserWithNoKey: ld.LDUser = { anonymous: true };
const user: ld.LDUser = {
key: 'user',
secondary: 'otherkey',
name: 'name',
firstName: 'first',
lastName: 'last',
email: 'test@example.com',
avatar: 'http://avatar.url',
ip: '1.1.1.1',
country: 'us',
anonymous: true,
custom: {
'a': 's',