()
| 1009 | * @since 4.0.0 |
| 1010 | */ |
| 1011 | export function BigInt<E extends string | number | bigint | boolean>(): Getter<bigint, E> { |
| 1012 | return transformEffect((input, options) => { |
| 1013 | try { |
| 1014 | return Effect.succeed(globalThis.BigInt(input)) |
| 1015 | } catch { |
| 1016 | return Effect.fail( |
| 1017 | new SchemaIssue.InvalidValue( |
| 1018 | { expected: "a value that can be converted to a bigint" }, |
| 1019 | input, |
| 1020 | options |
| 1021 | ) |
| 1022 | ) |
| 1023 | } |
| 1024 | }) |
| 1025 | } |
| 1026 | |
| 1027 | /** |
| 1028 | * Coerces a value to a `Date` using `new Date(input)`. |
nothing calls this directly
no test coverage detected