Revision b732961fc3c6eec3cf5508330cc09d6a0a2d8f9a authored by Andrew Scott on 26 September 2023, 17:31:27 UTC, committed by Alex Rickabaugh on 04 October 2023, 18:27:46 UTC
When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes https://github.com/angular/vscode-ng-language-service/issues/1923 PR Close #51912
1 parent 966ce97
tsconfig.json
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "src",
"outDir": "./out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "es2020",
"lib": [
"es2020",
"dom"
],
"skipLibCheck": true,
"strictPropertyInitialization": false,
"useDefineForClassFields": false
},
"exclude": [
"content",
"dist",
"node_modules",
"out-tsc",
"scripts",
"tools"
],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"disableTypeScriptVersionCheck": true,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Computing file changes ...