refactor(ivy): move the flat module index generator to its own package (#27743)
This commit moves the FlatIndexGenerator to its own package, in preparation to expand its capabilities and support re-exporting of private declarations from NgModules. PR Close #27743
This commit is contained in:

committed by
Kara Erickson

parent
f6c91c5a5a
commit
37b716b298
18
packages/compiler-cli/src/ngtsc/util/src/typescript.ts
Normal file
18
packages/compiler-cli/src/ngtsc/util/src/typescript.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const TS = /\.tsx?$/i;
|
||||
const D_TS = /\.d\.ts$/i;
|
||||
|
||||
export function isDtsPath(filePath: string): boolean {
|
||||
return D_TS.test(filePath);
|
||||
}
|
||||
|
||||
export function isNonDeclarationTsPath(filePath: string): boolean {
|
||||
return TS.test(filePath) && !D_TS.test(filePath);
|
||||
}
|
Reference in New Issue
Block a user