refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476)
Rather than re-reading component metadata that was already interpreted by the Ivy compiler, the Language Service should instead use the compiler APIs to get information it needs about the metadata. PR Close #39476
This commit is contained in:
committed by
Misko Hevery
parent
8e384d9f0d
commit
3a1d36cce3
@@ -10,6 +10,6 @@ export * from './src/api';
|
||||
export {DtsMetadataReader} from './src/dts';
|
||||
export {flattenInheritedDirectiveMetadata} from './src/inheritance';
|
||||
export {CompoundMetadataRegistry, LocalMetadataRegistry, InjectableClassRegistry} from './src/registry';
|
||||
export {ResourceRegistry, Resource, ComponentResources} from './src/resource_registry';
|
||||
export {ResourceRegistry, Resource, ComponentResources, isExternalResource, ExternalResource} from './src/resource_registry';
|
||||
export {extractDirectiveTypeCheckMeta, CompoundMetadataReader} from './src/util';
|
||||
export {BindingPropertyName, ClassPropertyMapping, ClassPropertyName, InputOrOutput} from './src/property_mapping';
|
||||
|
||||
@@ -23,6 +23,14 @@ export interface Resource {
|
||||
expression: ts.Expression;
|
||||
}
|
||||
|
||||
export interface ExternalResource extends Resource {
|
||||
path: AbsoluteFsPath;
|
||||
}
|
||||
|
||||
export function isExternalResource(resource: Resource): resource is ExternalResource {
|
||||
return resource.path !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the either inline or external resources of a component.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user