API reference
closeout/once
Every export of closeout/once, with its signature and doc comment: once.
once(fn) — a function that runs at most once and returns its first result thereafter
(design R5).
import { once } from 'closeout/once';Functions
once
Wrap fn so it runs at most once.
function once<T extends AnyFunction>(fn: T): T;| Parameter | Type |
|---|---|
fn | T |
Returns T
closeout
Every export of closeout, with its signature and doc comment: alternateScreen, assertDeadline, createRegistry, DEADLINE_ERROR_CODE, DeadlineError, DEFAULT_DEADLINE and 17 more, plus 16 types.
closeout/onetime
Every export of closeout/onetime, with its signature and doc comment: onetime, plus 2 types.