-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Bug Report
We can no longer use export =
in a d.ts file when 'verbatimModuleSyntax' is enabled ?
Should the 'verbatimModuleSyntax' check the d.ts file?
The d.ts file has no any side effects.
TS Version: 5.0.1-rc
💻 Code
// type1.d.ts
declare namespace NS {
type A = object;
}
export = NS;
export as namespace MyTypes;
// type2.d.ts
import type * as NS from 'moduleA';
export = NS;
export as namespace ModuleATypes;
🙁 Actual behavior
TS1282: An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but 'NS' only refers to a type.
🙂 Expected behavior
compile success
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue