TypeScript/tests/cases/fourslash/completionEntryOnNarrowedType.ts
2014-11-06 15:20:31 -08:00

20 lines
529 B
TypeScript

/// <reference path='fourslash.ts'/>
////function foo(strOrNum: string | number) {
//// /*1*/
//// if (typeof strOrNum === "number") {
//// /*2*/
//// }
//// else {
//// /*3*/
//// }
////}
goTo.marker('1');
verify.completionListContains("strOrNum", "(parameter) strOrNum: string | number");
goTo.marker('2');
verify.completionListContains("strOrNum", "(parameter) strOrNum: number");
goTo.marker('3');
verify.completionListContains("strOrNum", "(parameter) strOrNum: string");