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
Syntax highlighting breaks when you have an immediately-invoked function expression (IIFE) that's an arrow function:
Works fine with old-school function expressions:
All I can say is that when making an IIFE using an arrow function, it renders the body of it improperly (as shown in the first image), But for some reason, renders properly when you declare an interface before it (so I'd imagine it might work if you declare a class or type before it? Haven't tested it yet though.)
The text was updated successfully, but these errors were encountered:
The highlight.js project maintains the core language definitions, so we should probably follow up by filing an issue. Alternatively, we can try and find a 3rd party TS definition and test whether it has the same highlighting issue.
Reported by @toptobes:
Syntax highlighting breaks when you have an immediately-invoked function expression (IIFE) that's an arrow function:
Works fine with old-school function expressions:
All I can say is that when making an IIFE using an arrow function, it renders the body of it improperly (as shown in the first image), But for some reason, renders properly when you declare an interface before it (so I'd imagine it might work if you declare a class or type before it? Haven't tested it yet though.)
The text was updated successfully, but these errors were encountered: