Skip to main content
Module

x/scaffold/src/deps/types.ts>Finite

scaffold your next project with style and 💗
Latest
type alias Finite
import { type Finite } from "https://deno.land/x/scaffold@0.3.0/src/deps/types.ts";

A finite number. You can't pass a bigint as they are already guaranteed to be finite.

Use-case: Validating and documenting parameters.

Examples

Example 1

import type {Finite} from 'type-fest';

declare function setScore<T extends number>(length: Finite<T>): void;

Type Parameters

T extends number
definition: T extends PositiveInfinity | NegativeInfinity ? never : T