Function: Range()
ts
function Range(min, max): TypeFunction<number>;Defined in: packages/advanced-types/src/index.ts:49
Creates a range type function that validates the input is a number within the specified range.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The minimum acceptable value (inclusive) |
|
| The maximum acceptable value (inclusive) |
Returns
TypeFunction<number>
A TypeFunction that validates the input value
Throws
If the value is not a number or is outside the specified range

