mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
Add tests and accept baselines
This commit is contained in:
parent
42d055fdf3
commit
36549572aa
@ -28,9 +28,10 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(67,12): error TS2
|
||||
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(68,12): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(69,12): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(70,12): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (30 errors) ====
|
||||
==== tests/cases/conformance/types/union/unionTypeCallSignatures.ts (31 errors) ====
|
||||
var numOrDate: number | Date;
|
||||
var strOrBoolean: string | boolean;
|
||||
var strOrNum: string | number;
|
||||
@ -162,4 +163,9 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(70,12): error TS2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
|
||||
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
strOrNum = unionWithRestParameter4("hello", "world");
|
||||
|
||||
@ -70,6 +70,9 @@ strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
|
||||
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
|
||||
strOrNum = unionWithRestParameter3(); // error no call signature
|
||||
|
||||
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
|
||||
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
|
||||
strOrNum = unionWithRestParameter4("hello", "world");
|
||||
|
||||
|
||||
//// [unionTypeCallSignatures.js]
|
||||
@ -132,3 +135,6 @@ strOrNum = unionWithRestParameter3('hello', 10); // error no call signature
|
||||
strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
|
||||
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
|
||||
strOrNum = unionWithRestParameter3(); // error no call signature
|
||||
var unionWithRestParameter4;
|
||||
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
|
||||
strOrNum = unionWithRestParameter4("hello", "world");
|
||||
|
||||
@ -69,3 +69,6 @@ strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature
|
||||
strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature
|
||||
strOrNum = unionWithRestParameter3(); // error no call signature
|
||||
|
||||
var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };
|
||||
strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
|
||||
strOrNum = unionWithRestParameter4("hello", "world");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user