timocov / dts-bundle-generator

A tool to generate a single bundle of dts with types tree-shaking
MIT License
762 stars 40 forks source link

Declarations of "unknown" modules aren't included despite enabled `inlineDeclareExternals` flag #312

Closed timocov closed 7 months ago

timocov commented 7 months ago

Bug report

Input code

// config.ts
const config: TestCaseConfig = {
    output: {
        inlineDeclareExternals: true,
    },
};

index.d.ts:

/// <reference path="./modules.d.ts" preserve="true" />

export {};

modules.d.ts:

declare module '*.css' {}

declare module 'module-that-does-not-exist-actually' {
}

Expected output

declare module "*.css" { }
declare module "module-that-does-not-exist-actually" {
}

export {};

Actual output

export {};

Additional context Add any other context about the problem here (CLI options, etc)