function.ts

Declarations
#

6 declarations

view source

identity
#

noop
#

noop_async
#

function.ts view source

(...args: any[]): Promise<any>

Async function that returns a resolved promise.

args

type any[]

returns

Promise<any>

resolved
#

Thunk
#

function.ts view source

Thunk<T>

Represents a value wrapped in a function. Useful for lazy values and bridging reactive boundaries in Svelte.

generics

T

unthunk
#

function.ts view source

<T>(value: T | Thunk<T>): T

Returns the result of calling value if it's a function, otherwise it's like the identity function and passes it through.

value

type T | Thunk<T>

returns

T