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

Commit 6617a98

Browse files
committed
fix: use arrow fun, log error, state plugin source
1 parent 16bd116 commit 6617a98

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
@@ -865,7 +865,7 @@ export class ProjectConfiguration {
865865
);
866866
this.service = ts.createLanguageService(this.host, this.documentRegistry);
867867
const pluginLoader = new PluginLoader(this.rootFilePath, this.fs, this.initializationOptions, this.logger);
868-
pluginLoader.loadPlugins(options, this.enableProxy.bind(this));
868+
pluginLoader.loadPlugins(options, (factory, config) => this.enableProxy(factory, config));
869869
this.initialized = true;
870870
}
871871

@@ -892,7 +892,7 @@ export class ProjectConfiguration {
892892
const pluginModule = pluginModuleFactory({ typescript: ts });
893893
this.service = pluginModule.create(info);
894894
} catch (e) {
895-
this.logger.info(`Plugin activation failed: ${e}`);
895+
this.logger.error(`Plugin activation failed: ${e}`);
896896
}
897897
}
898898

0 commit comments

Comments
 (0)