Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 7382e8f

Browse files
committed
fix: use arrow fun, log error, state plugin source
1 parent 2292e96 commit 7382e8f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/plugins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { Logger, NoopLogger } from './logging';
33
import { combinePaths } from './match-files';
44
import { InitializationOptions } from './request-type';
55

6-
// definitions from from TypeScript server/project.ts
6+
// Based on types and logic from TypeScript server/project.ts @
7+
// https://github.com/Microsoft/TypeScript/blob/711e890e59e10aa05a43cb938474a3d9c2270429/src/server/project.ts
78

89
/**
910
* A plugin exports an initialization function, injected with

src/project-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ export class ProjectConfiguration {
923923
);
924924
this.service = ts.createLanguageService(this.host, this.documentRegistry);
925925
const pluginLoader = new PluginLoader(this.rootFilePath, this.fs, this.initializationOptions, this.logger);
926-
pluginLoader.loadPlugins(options, this.enableProxy.bind(this));
926+
pluginLoader.loadPlugins(options, (factory, config) => this.enableProxy(factory, config));
927927
this.initialized = true;
928928
}
929929

@@ -950,7 +950,7 @@ export class ProjectConfiguration {
950950
const pluginModule = pluginModuleFactory({ typescript: ts });
951951
this.service = pluginModule.create(info);
952952
} catch (e) {
953-
this.logger.info(`Plugin activation failed: ${e}`);
953+
this.logger.error(`Plugin activation failed: ${e}`);
954954
}
955955
}
956956

0 commit comments

Comments
 (0)