@@ -481,11 +481,13 @@ export function generateDtsBundle(entries: readonly EntryPointConfig[], options:
481
481
const exportElementSymbol = getImportExportReferencedSymbol ( exportElement , typeChecker ) ;
482
482
483
483
const namespaceImportFromImportableModule = getDeclarationsForSymbol ( exportElementSymbol ) . find ( ( importDecl : ts . Declaration ) : importDecl is ts . NamespaceImport => {
484
- return ts . isNamespaceImport ( importDecl ) && isReferencedModuleImportable ( importDecl . parent . parent ) ;
484
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
485
+ return ts . isNamespaceImport ( importDecl ) && isReferencedModuleImportable ( importDecl . parent . parent as ts . ImportDeclaration ) ;
485
486
} ) ;
486
487
487
488
if ( namespaceImportFromImportableModule !== undefined ) {
488
- const importModuleSpecifier = getImportModuleName ( namespaceImportFromImportableModule . parent . parent ) ;
489
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
490
+ const importModuleSpecifier = getImportModuleName ( namespaceImportFromImportableModule . parent . parent as ts . ImportDeclaration ) ;
489
491
if ( importModuleSpecifier === null ) {
490
492
throw new Error ( `Cannot get import module name from '${ namespaceImportFromImportableModule . parent . parent . getText ( ) } '` ) ;
491
493
}
@@ -987,7 +989,8 @@ export function generateDtsBundle(entries: readonly EntryPointConfig[], options:
987
989
const exportElementSymbol = getImportExportReferencedSymbol ( decl , typeChecker ) ;
988
990
const namespaceImport = getDeclarationsForSymbol ( exportElementSymbol ) . find ( ts . isNamespaceImport ) ;
989
991
if ( namespaceImport !== undefined ) {
990
- handleNamespacedImportOrExport ( namespaceImport . parent . parent , namespaceExports , symbol ) ;
992
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
993
+ handleNamespacedImportOrExport ( namespaceImport . parent . parent as ts . ImportDeclaration , namespaceExports , symbol ) ;
991
994
}
992
995
993
996
return ;
@@ -1028,7 +1031,8 @@ export function generateDtsBundle(entries: readonly EntryPointConfig[], options:
1028
1031
// i.e. `import * as NS from './local-module'`
1029
1032
const result = getDeclarationsForSymbol ( getImportExportReferencedSymbol ( decl , typeChecker ) ) . some ( ( importDecl : ts . Declaration ) => {
1030
1033
if ( ts . isNamespaceImport ( importDecl ) ) {
1031
- return ! isReferencedModuleImportable ( importDecl . parent . parent ) ;
1034
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1035
+ return ! isReferencedModuleImportable ( importDecl . parent . parent as ts . ImportDeclaration ) ;
1032
1036
}
1033
1037
1034
1038
if ( ts . isImportSpecifier ( importDecl ) ) {
0 commit comments