Bug Report
π Search Terms
declare asi semicolon
π Version & Regression Information
β― Playground Link
Playground link for version 4.3.5 (fine)
Playground link for version 4.4.4 (problematic)
π» Code
Some random examples that TS 5.1 considers valid syntax (not exhaustive):
declare let declare: any, foo: any
declare foo
declare let declare: any, foo: any
declare foo()
declare let declare: any, foo: any
declare {foo}
π Actual behavior
TypeScript silently does automatic semicolon insertion after declare in all of these cases without generating any syntax errors.
π Expected behavior
I expected these to be syntax errors. I did not expect TypeScript to silently be doing automatic semicolon insertion after declare here as if this is valid syntax.
Bug Report
π Search Terms
declare asi semicolon
π Version & Regression Information
β― Playground Link
Playground link for version 4.3.5 (fine)
Playground link for version 4.4.4 (problematic)
π» Code
Some random examples that TS 5.1 considers valid syntax (not exhaustive):
π Actual behavior
TypeScript silently does automatic semicolon insertion after
declarein all of these cases without generating any syntax errors.π Expected behavior
I expected these to be syntax errors. I did not expect TypeScript to silently be doing automatic semicolon insertion after
declarehere as if this is valid syntax.