-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
if (false) {
export var myClass = 0;
}
export type MyClass = typeof myClass;Trying to compile this with "declaration" on causes tsc to fatally error out with a Debug Failure (I've noticed the language service hangs on this file, yet to investigate why but I assume it's the same reason), after reporting the (correct) error
error TS1184: Modifiers cannot appear here.
Specifically, we get
Error: Debug Failure. False expression: isDeclarationVisible unknown: SyntaxKind: 190
SyntaxKind 190 refers to the Block kind. Looking at isDeclarationVisible, this is likely because it has an export flag, so it tries to check its parent's visibility (the block) and errors since it doesn't have a branch to handle Block.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue