Skip to content

LibrarySubset

LibrarySubset indicates a subset of the macros and function supported by a subsettable library.

new LibrarySubset(): LibrarySubset

LibrarySubset

disabled: boolean = false


disableMacros: boolean = false


excludeFunctions: EnvironmentFunction[] = []


excludeMacros: string[] = []


includeFunctions: EnvironmentFunction[] = []


includeMacros: string[] = []

addExcludedFunctions(…funcs): this

AddExcludedFunctions deny-lists one or more functions from the subset.

…EnvironmentFunction[]

this


addExcludedMacros(…macros): this

AddExcludedMacros deny-lists one or more macros by function name.

…string[]

this


addIncludedFunctions(…funcs): this

AddIncludedFunctions allow-lists one or more functions from the subset.

…EnvironmentFunction[]

this


addIncludedMacros(…macros): this

AddIncludedMacros allow-lists one or more macros by function name.

…string[]

this


setDisabled(value): this

SetDisabled disables or enables the library.

boolean

this


setDisableMacros(value): this

SetDisableMacros disables the macros for the library.

boolean

this


subsetFunction(fn): [FunctionDecl | undefined, boolean]

SubsetFunction produces a function declaration which matches the supported subset.

FunctionDecl

[FunctionDecl | undefined, boolean]


subsetMacro(macroFunction): boolean

SubsetMacro indicates whether the macro function should be included in the library subset.

string

boolean


validate(): Error | undefined

Validate validates the library configuration is well-formed.

Error | undefined