|
1 | 1 | tests/cases/compiler/tupleKinds.ts(1,22): error TS2370: A rest parameter must be of an array type.
|
| 2 | +tests/cases/compiler/tupleKinds.ts(4,44): error TS1144: '{' or ';' expected. |
| 3 | +tests/cases/compiler/tupleKinds.ts(4,44): error TS2304: Cannot find name 'is'. |
| 4 | +tests/cases/compiler/tupleKinds.ts(4,47): error TS1005: ';' expected. |
| 5 | +tests/cases/compiler/tupleKinds.ts(4,47): error TS2304: Cannot find name 'boolean'. |
| 6 | +tests/cases/compiler/tupleKinds.ts(4,55): error TS1005: ';' expected. |
| 7 | +tests/cases/compiler/tupleKinds.ts(6,45): error TS1144: '{' or ';' expected. |
| 8 | +tests/cases/compiler/tupleKinds.ts(6,46): error TS2304: Cannot find name 'U'. |
| 9 | +tests/cases/compiler/tupleKinds.ts(8,29): error TS1005: '>' expected. |
| 10 | +tests/cases/compiler/tupleKinds.ts(8,37): error TS2304: Cannot find name 'string'. |
| 11 | +tests/cases/compiler/tupleKinds.ts(8,45): error TS1109: Expression expected. |
| 12 | +tests/cases/compiler/tupleKinds.ts(8,48): error TS2304: Cannot find name 'args'. |
| 13 | +tests/cases/compiler/tupleKinds.ts(8,52): error TS1005: ';' expected. |
2 | 14 |
|
3 | 15 |
|
4 |
| -==== tests/cases/compiler/tupleKinds.ts (1 errors) ==== |
5 |
| - function tuple<...T>(...args:...T) { |
| 16 | +==== tests/cases/compiler/tupleKinds.ts (13 errors) ==== |
| 17 | + function tuple<...T>(...args:...T): ...T { |
6 | 18 | ~~~~~~~~~~~~
|
7 | 19 | !!! error TS2370: A rest parameter must be of an array type.
|
8 | 20 | return args;
|
9 | 21 | }
|
| 22 | + function noPredicates<...T>(...args): ...T is boolean { |
| 23 | + ~~ |
| 24 | +!!! error TS1144: '{' or ';' expected. |
| 25 | + ~~ |
| 26 | +!!! error TS2304: Cannot find name 'is'. |
| 27 | + ~~~~~~~ |
| 28 | +!!! error TS1005: ';' expected. |
| 29 | + ~~~~~~~ |
| 30 | +!!! error TS2304: Cannot find name 'boolean'. |
| 31 | + ~ |
| 32 | +!!! error TS1005: ';' expected. |
| 33 | + } |
| 34 | + function noArguments<...T, U>(...args): ...T<U> { |
| 35 | + ~ |
| 36 | +!!! error TS1144: '{' or ';' expected. |
| 37 | + ~ |
| 38 | +!!! error TS2304: Cannot find name 'U'. |
| 39 | + } |
| 40 | + function noConstraints<...T extends string>(...args) { |
| 41 | + ~~~~~~~ |
| 42 | +!!! error TS1005: '>' expected. |
| 43 | + ~~~~~~ |
| 44 | +!!! error TS2304: Cannot find name 'string'. |
| 45 | + ~~~ |
| 46 | +!!! error TS1109: Expression expected. |
| 47 | + ~~~~ |
| 48 | +!!! error TS2304: Cannot find name 'args'. |
| 49 | + ~ |
| 50 | +!!! error TS1005: ';' expected. |
| 51 | + } |
10 | 52 |
|
0 commit comments