API reference › @evolu/common › Function
Function utilities including exhaustive checks and composition.
| Function | Description |
|---|
| constant | Creates a Thunk that always returns a precomputed value. |
| disposable | Creates an object that follows JavaScript disposal semantics. |
| exhaustiveCheck | Helper function to ensure exhaustive matching in a switch statement. Throws an error if an unhandled case is encountered. |
| identity | Returns the value unchanged. |
| isDisposable | - |
| todo | Development placeholder that always throws. |
| Type Alias | Description |
|---|
| Thunk | A function that takes no arguments and returns a value. |