assertTypeFunction
assertTypeFunction
Section titled “assertTypeFunction”Assert that a value is of type function, with type-narrowing.
import { assertTypeFunction } from "@kensio/smartass";
const callback: unknown = () => "ok";
assertTypeFunction(callback);
// callback is now narrowed to FunctionSource
Section titled “Source”Source file: src/assert/type-function/type-function.assert.ts
