Skip to content

Commit 1359dbd

Browse files
committed
Merge branch 'master' into migrateMapsAndSets
2 parents 189e883 + 62b4377 commit 1359dbd

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/server/project.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ namespace ts.server {
282282
this.languageServiceEnabled = true;
283283
if (projectService.syntaxOnly) {
284284
this.compilerOptions.noResolve = true;
285+
this.compilerOptions.types = [];
285286
}
286287

287288
this.setInternalCompilerOptionsForEmittingJsFiles();

src/testRunner/unittests/tsserver/semanticOperationsOnSyntaxServer.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,19 @@ class c { prop = "hello"; foo() { return this.prop; } }`
9595
}
9696
assert.isTrue(hasException);
9797
});
98+
99+
it("should not include auto type reference directives", () => {
100+
const { host, session, file1 } = setup();
101+
const atTypes: File = {
102+
path: `/node_modules/@types/somemodule/index.d.ts`,
103+
content: "export const something = 10;"
104+
};
105+
host.ensureFileOrFolder(atTypes);
106+
const service = session.getProjectService();
107+
openFilesForSession([file1], session);
108+
checkNumberOfProjects(service, { inferredProjects: 1 });
109+
const project = service.inferredProjects[0];
110+
checkProjectActualFiles(project, [libFile.path, file1.path]); // Should not contain atTypes
111+
});
98112
});
99113
}

tests/cases/fourslash/codeFixClassImplementInterfaceAutoImports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import A from './types1';
3232
import { B, C, D } from './types2';
3333
3434
export class C implements Base {
35-
a: Readonly<A> & { kind: "a"; };
35+
a: Readonly<A> & { kind: 'a'; };
3636
b<T extends B = B>(p1: C): D<C> {
3737
throw new Error('Method not implemented.');
3838
}

0 commit comments

Comments
 (0)