You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is code that appears on DefinitelyTyped; type in this context is just an expression statement, not a keyword. Adding a semicolon fixes the problem, though in this case, we are hitting this bug because DT is now formatting with dprint, which can't parse the tree to add the semicolon.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
This is code that appears on DefinitelyTyped;
type
in this context is just an expression statement, not a keyword. Adding a semicolon fixes the problem, though in this case, we are hitting this bug because DT is now formatting with dprint, which can't parse the tree to add the semicolon.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.3.74&code=H4sIAAAAAAAAA0ssK8hJrNQrTi3xySwuSc1LLdKo5uVSUMjPKy5NKsksyUlNzkjMS0%2B1UtBIKS1KLMnMz9NRgEkV6yiUVBak6igklpQUZSaVlqQWayrY2imATQABmBYFfX0FFdeKgtTkkhCgBoVioPK8dJgquHH4lYGswq8C4Qx0dY5hAUBvBkMtcoSpi44Faa3l5arVBAAunNNbCQEAAA%3D%3D&config=H4sIAAAAAAAAA1VPOw7DIAzdOQXy3KFi6NA79BCIOhEtP2GiFkW5eyCBtNns9%2FF7nhnn8CIFdz6XsSxBRsJ47AWh7JL8FgRSDkgq6pDg0tlElRqkIdygZWcgyThiqi4kcRWiOcB4T9gdDbPa6SH%2FZypvQ0Sis7BKpRsNnhNZSwXrn9NGtl9q373BDX6iHnYcBk2P7oTJvZ3%2FOGDLCgEeJWgcAQAA
SWC Info output
No response
Expected behavior
This code parses;
type
can just be an identifier in an expression statement.Actual behavior
Parse error.
Version
1.3.74
Additional context
No response
The text was updated successfully, but these errors were encountered: