da6e82f639
Fixes #6663
26 lines
549 B
TypeScript
26 lines
549 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @allowNonTsExtensions: true
|
|
// @Filename: file.js
|
|
//// function fn() {
|
|
//// if (foo) {
|
|
//// return 0;
|
|
//// } else {
|
|
//// return '0';
|
|
//// }
|
|
//// }
|
|
//// let x = fn();
|
|
//// if(typeof x === 'string') {
|
|
//// x/*str*/
|
|
//// } else {
|
|
//// x/*num*/
|
|
//// }
|
|
|
|
goTo.marker('str');
|
|
edit.insert('.');
|
|
verify.completionListContains('substr', undefined, undefined, 'method');
|
|
|
|
goTo.marker('num');
|
|
edit.insert('.');
|
|
verify.completionListContains('toFixed', undefined, undefined, 'method');
|