We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
The first error is especially odd.
TypeScript Version: 3.7.x-dev.20200104
Search Terms:
Code
type C1 = (a: 1) => [0]; type C2 = (a: 2) => [number]; type C3 = (a: 3) => undefined; declare function f(a: C1 | C3): void; f(() => [0]); declare function g(a: C2 | C3): void; g(() => [0]);
Expected behavior: pass Actual behavior: Type 'number' is not assignable to type '0'.(2322) Property '0' is missing in type 'number[]' but required in type '[number]'.(2741) Playground Link: http://www.typescriptlang.org/play/index.html?ts=3.8.0-dev.20200104&ssl=1&ssc=1&pln=8&pc=14#code/C4TwDgpgBAwgjFAvFAFAQwFxTgSiQPigG0AGAXQG4AoUSWAJiVUynr0UKIDsBXAWwBGEAE6Ua4aDADMTdFintCPLgBMIAMwCWXCCupU1AYwA2aYdHXLDwTQHsuUdXNgIAPrAVYAbrc16qTiiKxOQ41Eam5o5WNvZQAObOMIzu0jjevv6JQQQhZGFAA
Related Issues:
The first error is especially odd.
TypeScript Version: 3.7.x-dev.20200104
Search Terms:
Code
Expected behavior:
pass
Actual behavior:
Type 'number' is not assignable to type '0'.(2322)
Property '0' is missing in type 'number[]' but required in type '[number]'.(2741)
Playground Link: http://www.typescriptlang.org/play/index.html?ts=3.8.0-dev.20200104&ssl=1&ssc=1&pln=8&pc=14#code/C4TwDgpgBAwgjFAvFAFAQwFxTgSiQPigG0AGAXQG4AoUSWAJiVUynr0UKIDsBXAWwBGEAE6Ua4aDADMTdFintCPLgBMIAMwCWXCCupU1AYwA2aYdHXLDwTQHsuUdXNgIAPrAVYAbrc16qTiiKxOQ41Eam5o5WNvZQAObOMIzu0jjevv6JQQQhZGFAA
Related Issues: