API reference@evolu/common › Function

Function utilities including exhaustive checks and composition.

Functions

FunctionDescription
exhaustiveCheckHelper function to ensure exhaustive matching in a switch statement. Throws an error if an unhandled case is encountered.
identityReturns the value unchanged.
lazyCreates a Lazy from a precomputed value.
todoDevelopment placeholder that always throws.

Type Aliases

Type AliasDescription
LazyA function that takes no arguments and returns a value of type T. Also known as a thunk.

Variables

VariableDescription
lazyFalseA Lazy that returns false.
lazyNullA Lazy that returns null.
lazyTrueA Lazy that returns true.
lazyUndefinedA Lazy that returns undefined.
lazyVoidA Lazy that returns undefined for void callbacks.