From e7d775b453eb7f74fd44eddb1c77f082c20be121 Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Sat, 24 Feb 2018 12:45:39 -0800 Subject: [PATCH 1/3] fix(typescript): expose private methods for buildserver --- src/project-manager.ts | 2 +- src/typescript-service.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/project-manager.ts b/src/project-manager.ts index b910f8ee7..f969dd785 100644 --- a/src/project-manager.ts +++ b/src/project-manager.ts @@ -1097,7 +1097,7 @@ export class ProjectManager implements Disposable { * @param filePath path to source (or config) file * @return configuration type to use for a given file */ - private getConfigurationType(filePath: string): ConfigType { + public getConfigurationType(filePath: string): ConfigType { const unixPath = toUnixPath(filePath) const name = path.posix.basename(unixPath) if (name === 'tsconfig.json') { diff --git a/src/typescript-service.ts b/src/typescript-service.ts index a6a6378af..83a1d0903 100644 --- a/src/typescript-service.ts +++ b/src/typescript-service.ts @@ -395,7 +395,6 @@ export class TypeScriptService { const definitions: ts.DefinitionInfo[] | undefined = configuration .getService() .getDefinitionAtPosition(fileName, offset) - return Observable.from(definitions || []).map((definition): Location => { const sourceFile = this._getSourceFile(configuration, definition.fileName, span) if (!sourceFile) { @@ -1615,7 +1614,7 @@ export class TypeScriptService { * @param fileName file name to fetch source file for or create it * @param span Span for tracing */ - private _getSourceFile( + protected _getSourceFile( configuration: ProjectConfiguration, fileName: string, span = new Span() From 1209126b837c856dc1ce9a70b4093c40fbd311c8 Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Mon, 26 Feb 2018 20:46:48 -0800 Subject: [PATCH 2/3] fix(src): getConfigurationType doesnt need to be public --- src/project-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project-manager.ts b/src/project-manager.ts index f969dd785..b910f8ee7 100644 --- a/src/project-manager.ts +++ b/src/project-manager.ts @@ -1097,7 +1097,7 @@ export class ProjectManager implements Disposable { * @param filePath path to source (or config) file * @return configuration type to use for a given file */ - public getConfigurationType(filePath: string): ConfigType { + private getConfigurationType(filePath: string): ConfigType { const unixPath = toUnixPath(filePath) const name = path.posix.basename(unixPath) if (name === 'tsconfig.json') { From a22585da236c0a29b5428d59590db6416f06858f Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Wed, 28 Feb 2018 14:06:21 -0800 Subject: [PATCH 3/3] revert --- src/typescript-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/typescript-service.ts b/src/typescript-service.ts index 83a1d0903..a09b00315 100644 --- a/src/typescript-service.ts +++ b/src/typescript-service.ts @@ -395,6 +395,7 @@ export class TypeScriptService { const definitions: ts.DefinitionInfo[] | undefined = configuration .getService() .getDefinitionAtPosition(fileName, offset) + return Observable.from(definitions || []).map((definition): Location => { const sourceFile = this._getSourceFile(configuration, definition.fileName, span) if (!sourceFile) {