mirror of
https://github.com/sindresorhus/type-fest.git
synced 2025-12-08 19:25:05 +00:00
10 lines
414 B
TypeScript
10 lines
414 B
TypeScript
import {expectType} from 'tsd';
|
|
import type {TupleMax} from '../../source/internal';
|
|
import type {PositiveInfinity} from '../../source/numeric';
|
|
|
|
expectType<TupleMax<[1, 2, 5, 3, 7, -9, -5, 0]>>(7);
|
|
expectType<TupleMax<[1, 2, 5, 3, 7, -9, -5, 0, PositiveInfinity]>>(null! as PositiveInfinity);
|
|
expectType<TupleMax<[1, 1, 1, 1, 1, 1]>>(1);
|
|
expectType<TupleMax<[-1, -2, -5]>>(-1);
|
|
expectType<TupleMax<[10, 2]>>(10);
|