Skip to content

Commit e2c9382

Browse files
committed
Fix wildcard params not being considered in external modules loader
1 parent 110e383 commit e2c9382

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

lib/resolution/ExternalModulesLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export class ExternalModulesLoader {
9696
case 'literal':
9797
case 'override':
9898
case 'undefined':
99+
case 'wildcard':
99100
case 'genericTypeReference':
100101
break;
101102
case 'class':

test/resolution/ExternalModulesLoader.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,23 @@ describe('ExternalModulesLoader', () => {
279279
.toEqual([]);
280280
});
281281

282+
it('should ignore wildcard constructor parameters', () => {
283+
const constructors: ClassIndex<ConstructorData<ParameterRangeResolved>> = <any> {
284+
Class1: {
285+
parameters: [
286+
{
287+
range: {
288+
type: 'wildcard',
289+
value: 'ignored',
290+
},
291+
},
292+
],
293+
},
294+
};
295+
expect(loader.findExternalPackages({}, constructors))
296+
.toEqual([]);
297+
});
298+
282299
it('should ignore genericTypeReference constructor parameters', () => {
283300
const constructors: ClassIndex<ConstructorData<ParameterRangeResolved>> = <any> {
284301
Class1: {

0 commit comments

Comments
 (0)