Skip to main content

Function: appendExtension()

appendExtension(name, factory, method)

appendExtension<C, R, K, V>(name, factory, method): WithParsedExtension<V, { [I in string]: Function }>

Append extension to a context enhancer or runner.

Type parameters

C extends object

R extends object

K extends string

V extends (...args) => ContextEnhancer<C, any, R> | (...args) => ContextEnhancer<C, any, R>

Parameters

name: K

factory: V

method: "use"

Returns

WithParsedExtension<V, { [I in string]: Function }>

Since

0.10.0

Todo

Improve generic typing.

Source

packages/core/src/actions/extensions/appendExtension.ts:21

appendExtension(name, factory, method)

appendExtension<C, R, K, V>(name, factory, method): WithParsedExtension<V, { [I in string]: Function }>

Append extension to a context enhancer or runner.

Type parameters

C extends object

R extends unknown

K extends string

V extends (...args) => ContextRunner<C, any, R> | (...args) => ContextRunner<C, any, R>

Parameters

name: K

factory: V

method: "run"

Returns

WithParsedExtension<V, { [I in string]: Function }>

Since

0.10.0

Todo

Improve generic typing.

Source

packages/core/src/actions/extensions/appendExtension.ts:30