Skip to main content

Class: FeatureFlags

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:14

Feature Flags are used to turn on/off features. These are primarily used before a feature has been fully released.

Constructors

Constructor

new FeatureFlags(flags): FeatureFlags

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:18

Parameters

flags

FeatureFlag[] = []

Returns

FeatureFlags

Methods

getFlag()

getFlag(flag): undefined | FlagTypes

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:32

Parameters

flag

string

Returns

undefined | FlagTypes


getFlagBool()

getFlagBool(flag): undefined | boolean

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:36

Parameters

flag

string

Returns

undefined | boolean


getFlagInfo()

getFlagInfo(flag): undefined | FeatureFlag

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:49

Parameters

flag

string

Returns

undefined | FeatureFlag


getFlags()

getFlags(): FeatureFlag[]

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:53

Returns

FeatureFlag[]


getFlagValues()

getFlagValues(): Map<string, FlagTypes>

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:57

Returns

Map<string, FlagTypes>


register()

Call Signature

register(flag): this

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:22

Parameters
flag

FeatureFlag

Returns

this

Call Signature

register(name, description): this

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:23

Parameters
name

string

description

string

Returns

this


reset()

reset(): this

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:61

Returns

this


setFlag()

setFlag(flag, value): this

Defined in: packages/cspell-lib/src/lib/FeatureFlags/FeatureFlags.ts:40

Parameters

flag

string

value

FlagTypes = true

Returns

this