A finite number.
number
You can't pass a bigint as they are already guaranteed to be finite.
bigint
Use-case: Validating and documenting parameters.
一个有限的数字。
数字
你不能传递bigint,因为它们已经被保证是有限的。
使用场景:验证和记录参数。
要检查的数字类型
declare function setScore<T extends number>(length: Finite<T>): void; Copy
declare function setScore<T extends number>(length: Finite<T>): void;
A finite
number.You can't pass a
bigintas they are already guaranteed to be finite.Use-case: Validating and documenting parameters.
一个有限的
数字。你不能传递
bigint,因为它们已经被保证是有限的。使用场景:验证和记录参数。