UNPKG

1.65 kBSource Map (JSON)View Raw
1{
2 "version": 3,
3 "sources": ["../../../../../packages/language-service/plugin-factory.ts"],
4 "sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// Note: use a type-only import to prevent TypeScript from being bundled in.\nimport type ts from 'typescript';\n\nimport {NgLanguageService, PluginConfig} from './api';\n\ninterface PluginModule extends ts.server.PluginModule {\n create(createInfo: ts.server.PluginCreateInfo): NgLanguageService;\n onConfigurationChanged?(config: PluginConfig): void;\n}\n\nexport const factory: ts.server.PluginModuleFactory = (tsModule): PluginModule => {\n let plugin: PluginModule;\n\n return {\n create(info: ts.server.PluginCreateInfo): NgLanguageService {\n plugin = require(`./bundles/language-service.js`)(tsModule);\n return plugin.create(info);\n },\n getExternalFiles(project: ts.server.Project): string[] {\n return plugin?.getExternalFiles?.(project, tsModule.typescript.ProgramUpdateLevel.Full) ?? [];\n },\n onConfigurationChanged(config: PluginConfig): void {\n plugin?.onConfigurationChanged?.(config);\n },\n };\n};\n"],
5 "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAkBO,IAAM,UAAyC,CAAC,aAA0B;AAC/E,MAAI;AAEJ,SAAO;IACL,OAAO,MAAgC;AACrC,eAAS,QAAQ,iCAAiC,QAAQ;AAC1D,aAAO,OAAO,OAAO,IAAI;IAC3B;IACA,iBAAiB,SAA0B;AA1B/C;AA2BM,cAAO,4CAAQ,qBAAR,gCAA2B,SAAS,SAAS,WAAW,mBAAmB,UAA3E,YAAoF,CAAA;IAC7F;IACA,uBAAuB,QAAoB;AA7B/C;AA8BM,6CAAQ,2BAAR,gCAAiC;IACnC;;AAEJ;",
6 "names": []
7}