artboard-deluxe / ArtboardPluginOptions
ArtboardPluginOptions<T>
ArtboardPluginOptions<
T> =object
Defined in: types/index.ts:64
Type Parameters
T
T extends object
Methods
computed()
computed<
R>(callback):object
Defined in: types/index.ts:116
Compute and cache a value based on the current options.
If any option is changed (via set or setAll), the cache is cleared.
Type Parameters
R
R
Parameters
callback
(options) => R
Returns
object
value
value:
R
get()
Call Signature
get<
K>(key):T[K]
Defined in: types/index.ts:68
Get an option value.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
Returns
T[K]
Call Signature
get<
K>(key,defaultValue):NonNullable<T[K]>
Defined in: types/index.ts:94
Get an option value with a default value.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
defaultValue
T[K]
Returns
NonNullable<T[K]>
getElement()
getElement<
K>(key,fallbackSelector,parent):HTMLElement
Defined in: types/index.ts:80
Get an option that is either a DOM element or a selector.
Throws an error if no element could be found.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
fallbackSelector
string
parent
HTMLElement
Returns
HTMLElement
getRequired()
getRequired<
K>(key):T[K]
Defined in: types/index.ts:73
Get a required option value. If the option is not set an error is thrown.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
Returns
T[K]
set()
set<
K>(key,value):void
Defined in: types/index.ts:99
Set an option.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
value
T[K]
Returns
void
setAll()
setAll(
newOptions):void
Defined in: types/index.ts:104
Set all options at once.
Parameters
newOptions
T
Returns
void
setMultiple()
setMultiple(
newOptions):void
Defined in: types/index.ts:109
Set multiple options at once.
Parameters
newOptions
Partial<T>
Returns
void
should()
should<
K>(key,defaultValue?):boolean
Defined in: types/index.ts:89
Returns the boolean representation of an option.
Type Parameters
K
K extends string | number | symbol
Parameters
key
K
defaultValue?
T[K]
Returns
boolean