mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Add test
This commit is contained in:
committed by
Daniel Rosenwasser
parent
02df49994b
commit
22979db64c
@@ -0,0 +1,14 @@
|
||||
declare function isString1(a: number, b: Object): b is string;
|
||||
|
||||
declare function isString2(a: Object): a is string;
|
||||
|
||||
switch (isString1(0, "")) {
|
||||
case isString2(""):
|
||||
default:
|
||||
}
|
||||
|
||||
var x = isString1(0, "") === isString2("");
|
||||
|
||||
function isString3(a: number, b: number, c: Object): c is string {
|
||||
return isString1(0, c);
|
||||
}
|
||||
Reference in New Issue
Block a user