Hacker News new | past | comments | ask | show | jobs | submit login

"Import" was already decided to help the parser performing static analysis versus "require". Now "mjs" is introduced to make detecting if we are in front of a commonjs or module "faster". I'm sure the people who decided this are very bright, but the main goal was how to be nice with v8, and not how to be easy for developers.

Changing from js to ts is an inconvenience sufficiently big enough to adopt flowtype instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: