Closed
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
.