@@ -12,13 +12,13 @@ const isFile = async (filePath: string) => {
12
12
}
13
13
} ;
14
14
15
- export const findFile = async ( cwd : string , fileName : string ) : Promise < string > => {
15
+ const findFile = async ( cwd : string , fileName : string ) : Promise < string > => {
16
16
const filePath = path . join ( cwd , fileName ) ;
17
17
if ( await isFile ( filePath ) ) return filePath ;
18
18
return findFile ( path . resolve ( cwd , '..' ) , fileName ) ;
19
19
} ;
20
20
21
- export const resolvePaths = ( cwd : string , patterns : string | string [ ] ) => {
21
+ const resolvePaths = ( cwd : string , patterns : string | string [ ] ) => {
22
22
return [ patterns ] . flat ( ) . map ( pattern => {
23
23
if ( pattern . startsWith ( '!' ) ) return '!' + path . join ( cwd , pattern . slice ( 1 ) ) ;
24
24
return path . join ( cwd , pattern ) ;
@@ -51,11 +51,6 @@ export const partitionSourceFiles = (projectFiles: SourceFile[], productionFiles
51
51
return [ usedFiles , unusedFiles ] ;
52
52
} ;
53
53
54
- export const isType = ( declaration : ExportedDeclarations ) =>
55
- declaration . isKind ( ts . SyntaxKind . TypeAliasDeclaration ) ||
56
- declaration . isKind ( ts . SyntaxKind . InterfaceDeclaration ) ||
57
- declaration . isKind ( ts . SyntaxKind . EnumDeclaration ) ;
58
-
59
54
export const getType = ( declaration : ExportedDeclarations ) => {
60
55
if ( declaration . isKind ( ts . SyntaxKind . TypeAliasDeclaration ) ) return 'type' ;
61
56
if ( declaration . isKind ( ts . SyntaxKind . InterfaceDeclaration ) ) return 'interface' ;
0 commit comments