Skip to content

Commit 65a48ca

Browse files
committed
Encorporting feedback
1 parent b62f5b0 commit 65a48ca

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ declare module "convert-source-map" {
745745
export function fromSource(source: string, largeSource?: boolean): SourceMapConverter;
746746
}
747747

748-
gulp.task("browserify", "Runs browserify on run.js to produce a file suitable for running tests in the browser", [servicesFile], (done) => {
748+
gulp.task("browserify", "Runs browserify on run.js to produce a file suitable for running tests in the browser", [servicesFile, run], (done) => {
749749
const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({ outFile: "../../built/local/bundle.js" }, /*useBuiltCompiler*/ true));
750750
return testProject.src()
751751
.pipe(newer("built/local/bundle.js"))

src/services/completions.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,9 @@ namespace ts.Completions {
749749
}
750750

751751
function isContextTokenValueLocation(contextToken: Node) {
752-
if (contextToken) {
753-
const parentKind = contextToken.parent.kind;
754-
switch (contextToken.kind) {
755-
case SyntaxKind.TypeOfKeyword:
756-
return parentKind === SyntaxKind.TypeQuery;
757-
}
758-
}
752+
return contextToken &&
753+
contextToken.kind === SyntaxKind.TypeOfKeyword &&
754+
contextToken.parent.kind === SyntaxKind.TypeQuery;
759755
}
760756

761757
function isContextTokenTypeLocation(contextToken: Node) {

tests/cases/fourslash/completionListWithMeanings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
////var tt = /*valueExpr*/xx;
1212
////var yy: /*typeExpr*/point = { x: 4, y: 3 + /*valueExprInObjectLiteral*/tt };
1313
////var kk: m3.point3/*membertypeExpr*/ = m3.zz2/*membervalueExpr*/;
14+
////var zz = </*typeExpr2*/point>{ x: 4, y: 3 };
1415

1516
const markers = test.markerNames();
1617

@@ -37,6 +38,7 @@ const values: CompletionInfo[] = [
3738
["xx", "var xx: number"],
3839
["tt", "var tt: number"],
3940
["yy", "var yy: point"],
41+
["zz", "var zz: point"],
4042
["m2", "namespace m2"], // With no type side, allowed only in value
4143
];
4244

0 commit comments

Comments
 (0)