MCPcopy Create free account
hub / github.com/Effect-TS/effect / isFinite

Function isFinite

packages/effect/src/SchemaAST.ts:4259–4275  ·  view source on GitHub ↗
(annotations?: Schema.Annotations.Filter)

Source from the content-addressed store, hash-verified

4257
4258/** @internal */
4259export function isFinite(annotations?: Schema.Annotations.Filter) {
4260 return makeFilter(
4261 (n: number) => globalThis.Number.isFinite(n),
4262 {
4263 expected: "a finite number",
4264 representation: {
4265 id: "effect/schema/isFinite",
4266 payload: null
4267 },
4268 toJsonSchema: () => ({ type: "number" }),
4269 arbitraryConstraint: {
4270 number: "finite"
4271 },
4272 ...annotations
4273 }
4274 )
4275}
4276
4277/** @internal */
4278export const finite = appendChecks(number, [isFinite()])

Callers 1

SchemaAST.tsFile · 0.70

Calls 1

makeFilterFunction · 0.70

Tested by

no test coverage detected