style(compiler): fix typo and formatting (#23729)

PR Close #23729
This commit is contained in:
Alan Agius 2018-05-06 17:50:35 +02:00 committed by Matias Niemelä
parent 41cd8f3efb
commit 31795b620f
2 changed files with 2 additions and 5 deletions

View File

@ -12,7 +12,6 @@ import {ValueTransformer, visitValue} from '../util';
import {StaticSymbol, StaticSymbolCache} from './static_symbol';
import {isGeneratedFile, stripSummaryForJitFileSuffix, stripSummaryForJitNameSuffix, summaryForJitFileName, summaryForJitName} from './util';
const DTS = /\.d\.ts$/;
const TS = /^(?!.*\.d\.ts$).*\.ts$/;
export class ResolvedStaticSymbol {
@ -334,7 +333,7 @@ export class StaticSymbolResolver {
}
// 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.
if (metadata['metadata']) {
// handle direct declarations of the symbol
@ -387,7 +386,7 @@ export class StaticSymbolResolver {
let _originalFileMemo: string|undefined;
const getOriginalName: () => string = () => {
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
// .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.

View File

@ -11,8 +11,6 @@ import {CollectorOptions, METADATA_VERSION} from '@angular/compiler-cli';
import {MetadataCollector} from '@angular/compiler-cli/src/metadata/collector';
import * as ts from 'typescript';
// This matches .ts files but not .d.ts files.
const TS_EXT = /(^.|(?!\.d)..)\.ts$/;