JavaScript: Static and async keyword stops working after {} in class property
Sample.
class StaticTest {
static worksFine() {
var isFine = {};
}
static stillWorks() {
{
// is this even allowed?
}
}
static myField = {;
static myOtherField = {};
static nowItStopsWorking;
async fetchStuff() {
return new Promise((resolve) => {
// stuff
resolve();
});
}
}
As you can see, GitLab has no trouble. Here is how gnome-text-editor renders it:
The issue occurs even without the deliberate syntax errors.
Edited by TheKodeToad