Skip to content

assertcheck v1.0.0


assertcheck / assert / func

Function: func() ​

ts
function func<T>(v, opts?): asserts v is T;

Defined in: src/assert.ts:364

Asserts that v is a function. Narrows the type to T after the call.

Type Parameters ​

Type ParameterDefault type
T extends (...args) => unknown(...args) => unknown

Parameters ​

ParameterType
vunknown
opts?Opts

Returns ​

asserts v is T

Example ​

ts
`assert.func(handler, "handler must be a function")`

Released under the Apache 2.0 License. Built by Vagabond Studio — senior-only for growing companies.