@@ -127,10 +127,6 @@ function resolveBaseExport(importedName: string): string | undefined {
127
127
if ( importedName === 'UI5WCSlotsNode' ) {
128
128
return `${ basePackageName } /types` ;
129
129
}
130
- //todo: why is this required?
131
- // if (importedName === 'default' || importedName === 'index') {
132
- // return basePackageName;
133
- // }
134
130
return undefined ;
135
131
}
136
132
@@ -150,9 +146,6 @@ function resolveChartsExport(importedName: string): string | undefined {
150
146
if ( directMap [ importedName ] ) {
151
147
return directMap [ importedName ] ;
152
148
}
153
- if ( importedName === 'default' || importedName === 'index' ) {
154
- return chartsPackageName ;
155
- }
156
149
return undefined ;
157
150
}
158
151
@@ -169,7 +162,7 @@ export default function transform(file: FileInfo, api: API): string | undefined
169
162
packageNames . forEach ( ( pkg ) => {
170
163
root . find ( j . ImportDeclaration , { source : { value : pkg } } ) . forEach ( ( importPath ) => {
171
164
const specifiers = importPath . node . specifiers || [ ] ;
172
- specifiers . forEach ( ( spec : any ) => {
165
+ specifiers . forEach ( ( spec ) => {
173
166
if ( spec . type !== 'ImportSpecifier' ) return ;
174
167
const importedName = spec . imported . name as string ;
175
168
let componentName = importedName ;
@@ -210,7 +203,7 @@ export default function transform(file: FileInfo, api: API): string | undefined
210
203
// Namespace import deltas
211
204
if ( pkg === basePackageName && [ 'Device' , 'hooks' ] . includes ( importedName ) ) {
212
205
const newImport = j . importDeclaration (
213
- [ j . importNamespaceSpecifier ( j . identifier ( spec . local ?. name || importedName ) ) ] ,
206
+ [ j . importNamespaceSpecifier ( j . identifier ( ( spec . local ?. name as string ) || importedName ) ) ] ,
214
207
j . literal ( `${ basePackageName } /${ importedName } ` ) ,
215
208
) ;
216
209
j ( importPath ) . insertBefore ( newImport ) ;
0 commit comments