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
Flag in light of strippable type support for TypeScript in Node.js.
--erasableSyntaxOnly
What is it?
No enums, namespaces, parameter properties.
Allow all these in ambient contexts (declare keywords).
Can we get it in in the next week?
Probably.
--verbatimModuleSyntax?
Compilers can do this independently?
Module elision is not in line with what Node itself supports.
Also, purists might not really be into module elision in the first place.
Unclear
What about uninstantiated namespaces?
They should be allowed...but Node.js disallows them.
// uninstantiated - should be allowed, currently is NOT in Node.js ⚠️exportnamespacefoo1{exportinterfaceI{}}// ambient - should be allowed, currently is in Node.jsexportdeclarenamespacefoo2{exportinterfaceI{}}// instantiated - should *not* be allowed, and is currently disallowed in Node.jsexportnamespacefoo3{exportinterfaceI{}1+2;}
Flag for Erasable Syntax Only
--erasableSyntaxOnly
declare
keywords).--verbatimModuleSyntax
?declare
is a bit of a footgun to force everyone to write: Tsconfig option to disallow features requiring transformations which are not supported by Node.js' --strip-types #59601 (comment)declare
makes it clear there's no JSdeclare
implies something is a little bit odd about the surrounding environment.The text was updated successfully, but these errors were encountered: