SplitScript reference / Never

Never

Built-in type

Never

Describes an expression that cannot produce a value.

The Never type is the bottom of SplitScript's type hierarchy and can flow into any expected value type. It is inferred for genuinely divergent control flow and is erased from WebAssembly. Process.closed returns async Never because process-lifetime cancellation prevents its await from resuming.

Examples

Use Never

fn ignoreUnsupportedBuild() -> async Never {
    await process.closed()
}