class Foo {
foo = async x => {
try {
console.log(x)
return x || {}
} catch (e) {
console.error(e)
}
}
}
There are some jsParensError syntax errors:
Just letting you know in case you want to check it, maybe we can wait until this gets in a official ES release, although currently is a wide supported feature:
Babel 7.0+
Node 12
Public fields are enabled by default in Chrome 72 / V8 7.2
Private fields are enabled by default in Chrome 74 / V8 7.4
Public instance fields are enabled by default in Firefox 69
Public static fields are enabled in Firefox Nightly 75 as of Febraury 22, 2020
Public instance fields are shipped behind a flag in Safari Technology Preview 101
Moddable XS
QuickJS
TypeScript 3.8
@davidsierradz It seems to be a flaw caused by the anonymous async function. I have fixed it in the latest code and didn't break my test files. Let me know if you have any questions.
Sorry if this is out of scope or maybe to soon to implement, for reference look: tc39/proposal-class-fields: Orthogonally-informed combination of public and private fields proposals, with a minimal
init.vim
:And the following JavaScript file:
There are some
jsParensError
syntax errors:Just letting you know in case you want to check it, maybe we can wait until this gets in a official ES release, although currently is a wide supported feature:
Thanks!