Skip to content

Commit 20515ce

Browse files
committed
Encorporting feedback
1 parent c191abe commit 20515ce

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
@@ -747,7 +747,7 @@ declare module "convert-source-map" {
747747
export function fromSource(source: string, largeSource?: boolean): SourceMapConverter;
748748
}
749749

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

src/services/completions.ts

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

769769
function isContextTokenValueLocation(contextToken: Node) {
770-
if (contextToken) {
771-
const parentKind = contextToken.parent.kind;
772-
switch (contextToken.kind) {
773-
case SyntaxKind.TypeOfKeyword:
774-
return parentKind === SyntaxKind.TypeQuery;
775-
}
776-
}
770+
return contextToken &&
771+
contextToken.kind === SyntaxKind.TypeOfKeyword &&
772+
contextToken.parent.kind === SyntaxKind.TypeQuery;
777773
}
778774

779775
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)