Skip to content

Commit 186e6fd

Browse files
committed
Handling declaration of modules that are "unknown" i.e. there is no value declaration for them
Fixes #312
1 parent 21f2803 commit 186e6fd

File tree

6 files changed

+23
-1
lines changed

6 files changed

+23
-1
lines changed

src/bundle-generator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ export function generateDtsBundle(entries: readonly EntryPointConfig[], options:
569569
return;
570570
}
571571

572-
const referencedModuleInfo = getReferencedModuleInfo(moduleDecl, criteria, typeChecker);
572+
const referencedModuleInfo = getModuleLikeModuleInfo(moduleDecl, criteria, typeChecker);
573573
if (referencedModuleInfo === null) {
574574
return;
575575
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { TestCaseConfig } from '../../test-cases/test-case-config';
2+
3+
const config: TestCaseConfig = {
4+
output: {
5+
inlineDeclareExternals: true,
6+
},
7+
};
8+
9+
export = config;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('../run-test-case').runTestCase(__dirname);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// <reference path="./modules.d.ts" preserve="true" />
2+
3+
export {};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.css' {}
2+
3+
declare module 'module-that-does-not-exist-actually' {
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module "*.css" { }
2+
declare module "module-that-does-not-exist-actually" {
3+
}
4+
5+
export {};

0 commit comments

Comments
 (0)