Skip to content

Commit eb569a5

Browse files
authored
chore(ts-toolbelt): remove deprecated test (microsoft#37932)
1 parent 141ee01 commit eb569a5

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

tests/cases/user/ts-toolbelt/index.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type StdRecursiveIteration<T extends any[], I extends I.Iteration = I.IterationO
1212
I.Pos<I> extends T.Length<T> // this form of recursion is preferred
1313
? 1 // because it will let the user know if
1414
: 0 // the instantiation depth has been hit
15-
]; // (but error is sometimes swallowed (?))
15+
];
1616

1717
checks([
1818
check<StdRecursiveIteration<[
@@ -22,23 +22,3 @@ checks([
2222
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2323
]>, 40, Test.Pass>(), // max length is 40
2424
]);
25-
26-
// iterates over `T` and returns the `Iteration` position when finished
27-
type SafeRecursiveIteration<T extends any[], I extends I.Iteration = I.IterationOf<'0'>> = {
28-
0: SafeRecursiveIteration<T, I.Next<I>>;
29-
1: I.Pos<I>;
30-
}[
31-
I.Key<I> extends T.Length<T, 's'> // this form of recursion is the safest
32-
? 1 // because `T.Length<T, 's'>` will force
33-
: 0 // the length to comply with the limits
34-
]; // => won't compute if excessive length
35-
36-
checks([
37-
check<SafeRecursiveIteration<[
38-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
39-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
40-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43-
]>, 0, Test.Pass>() // did not compute
44-
]);

0 commit comments

Comments
 (0)