private Node GetOwnTypeDefinition(string typeName) { ExportSpecifier specifier = this.GetExportSpecifier(typeName); if (specifier == null) { return(null); } SourceFile sourceFile = this.Ancestor(NodeKind.SourceFile) as SourceFile; Node definition = sourceFile.GetOwnModuleTypeDefinition(specifier.DefinitionName); if (definition != null) { return(definition); } definition = sourceFile.GetImportModuleTypeDefinition(specifier.DefinitionName); if (definition != null) { return(definition); } return(null); }
private Node GetFromTypeDefinition(string typeName) { Document fromDoc = this.Project.GetDocumentByPath(this.ModulePath); if (fromDoc == null) { return(null); } if (this.ExportClause == null) // export * from './abc' { return(fromDoc.GetExportTypeDefinition(typeName)); } ExportSpecifier specifier = this.GetExportSpecifier(typeName); if (specifier != null) { return(fromDoc.GetExportTypeDefinition(specifier.DefinitionName)); } return(null); }