parent
41cd8f3efb
commit
31795b620f
@ -12,7 +12,6 @@ import {ValueTransformer, visitValue} from '../util';
|
|||||||
import {StaticSymbol, StaticSymbolCache} from './static_symbol';
|
import {StaticSymbol, StaticSymbolCache} from './static_symbol';
|
||||||
import {isGeneratedFile, stripSummaryForJitFileSuffix, stripSummaryForJitNameSuffix, summaryForJitFileName, summaryForJitName} from './util';
|
import {isGeneratedFile, stripSummaryForJitFileSuffix, stripSummaryForJitNameSuffix, summaryForJitFileName, summaryForJitName} from './util';
|
||||||
|
|
||||||
const DTS = /\.d\.ts$/;
|
|
||||||
const TS = /^(?!.*\.d\.ts$).*\.ts$/;
|
const TS = /^(?!.*\.d\.ts$).*\.ts$/;
|
||||||
|
|
||||||
export class ResolvedStaticSymbol {
|
export class ResolvedStaticSymbol {
|
||||||
@ -334,7 +333,7 @@ export class StaticSymbolResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handle the actual metadata. Has to be after the exports
|
// handle the actual metadata. Has to be after the exports
|
||||||
// as there migth be collisions in the names, and we want the symbols
|
// as there might be collisions in the names, and we want the symbols
|
||||||
// of the current module to win ofter reexports.
|
// of the current module to win ofter reexports.
|
||||||
if (metadata['metadata']) {
|
if (metadata['metadata']) {
|
||||||
// handle direct declarations of the symbol
|
// handle direct declarations of the symbol
|
||||||
@ -387,7 +386,7 @@ export class StaticSymbolResolver {
|
|||||||
let _originalFileMemo: string|undefined;
|
let _originalFileMemo: string|undefined;
|
||||||
const getOriginalName: () => string = () => {
|
const getOriginalName: () => string = () => {
|
||||||
if (!_originalFileMemo) {
|
if (!_originalFileMemo) {
|
||||||
// Guess what hte original file name is from the reference. If it has a `.d.ts` extension
|
// Guess what the original file name is from the reference. If it has a `.d.ts` extension
|
||||||
// replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have
|
// replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have
|
||||||
// .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`
|
// .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`
|
||||||
// location as it is not important to finding the file.
|
// location as it is not important to finding the file.
|
||||||
|
@ -11,8 +11,6 @@ import {CollectorOptions, METADATA_VERSION} from '@angular/compiler-cli';
|
|||||||
import {MetadataCollector} from '@angular/compiler-cli/src/metadata/collector';
|
import {MetadataCollector} from '@angular/compiler-cli/src/metadata/collector';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This matches .ts files but not .d.ts files.
|
// This matches .ts files but not .d.ts files.
|
||||||
const TS_EXT = /(^.|(?!\.d)..)\.ts$/;
|
const TS_EXT = /(^.|(?!\.d)..)\.ts$/;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user