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
Currently there are two ways to make comments // and /**/ I think if ecma262 has a broader way of implementing comments it can open up the door for third party type checkers and leave the burden onto others without the need for transpiling.
I am looking into how close ES20XX syntax for example compares to typescript syntax. A js compiler doesn't need to look at the typings at all, just be smart enough to ignore typings. Is the ECMA262 community willing to look at a few syntax notations that a js parser should ignore?
If there is no objection at first look I am going to put in the effort to try to cover a complete syntax that extends // and /**/ so others can use that to implement for example a type checker? Notice that I am not asking for type checking itself, just expanding // and /**/ that makes it possible for others to do for example type checking and maintain a clean syntax look of their code.
EDIT: We can "use strict comments"; to prevent web breakage
ljharb
added
the
feature suggestion
Please see https://github.com/tc39/ecma262/blob/HEAD/CONTRIBUTING.md#creating-a-new-proposal
label
Jan 29, 2019
Currently there are two ways to make comments
//
and/**/
I think if ecma262 has a broader way of implementing comments it can open up the door for third party type checkers and leave the burden onto others without the need for transpiling.I am looking into how close ES20XX syntax for example compares to typescript syntax. A js compiler doesn't need to look at the typings at all, just be smart enough to ignore typings. Is the ECMA262 community willing to look at a few syntax notations that a js parser should ignore?
If there is no objection at first look I am going to put in the effort to try to cover a complete syntax that extends
//
and/**/
so others can use that to implement for example a type checker? Notice that I am not asking for type checking itself, just expanding//
and/**/
that makes it possible for others to do for example type checking and maintain a clean syntax look of their code.EDIT: We can
"use strict comments";
to prevent web breakageExample ES2015 code
Example typescript code
The text was updated successfully, but these errors were encountered: