Live data from Hacker News

Node.js enables TypeScript handling by default

nodejs.org

1–8 of 8 posts

Re: Node.js enables TypeScript handling by default

#4
Great to see this moving forward.

It does seem a bit of a mixed message to enable this by default while still saying the functionality is experimental. I fear many people will take this as a signal to start using the feature in production, then find a later Node.js update breaks things if the behaviour changes.

Re: Node.js enables TypeScript handling by default

#5

Hi I'm the author of this feature, I'll answer to questions.

Can we have short explanation on the features supported? It is not clear on the doc which ones launched now? waiting for JS Decorator feature?

Does it mean that any type mentioned in https://www.typescriptlang.org/docs/handbook/2/everyday-type... is supported? Any exception to this list? or additional?

For feature depends on JS Decorator, that involves transformation, what are those? I saw enums and namespaces. Any list?

Thanks, I am not so familiar with Typescript, though I saw some of the libraries I use are sprinkled with TS.

Re: Node.js enables TypeScript handling by default

#6
post #5

Hi I'm the author of this feature, I'll answer to questions.

Can we have short explanation on the features supported? It is not clear on the doc which ones launched now? waiting for JS Decorator feature? Does it mean that any type mentioned in https://www.typescriptlang.org/docs/handbook/2/everyday-type... is supported? Any exception to this list? or additional? For feature depends on JS Decorator, that involves transformation, what are those? I saw enums and namespaces. Any l…

I have been reading the discussion on https://github.com/nodejs/loaders/issues/208 however I am still not sure what is the decision.

Re: Node.js enables TypeScript handling by default

#7
post #5

Hi I'm the author of this feature, I'll answer to questions.

Can we have short explanation on the features supported? It is not clear on the doc which ones launched now? waiting for JS Decorator feature? Does it mean that any type mentioned in https://www.typescriptlang.org/docs/handbook/2/everyday-type... is supported? Any exception to this list? or additional? For feature depends on JS Decorator, that involves transformation, what are those? I saw enums and namespaces. Any l…

The flag --experimental-strip-types has been enabled by default. Only syntax that dont require transformation is allowed. Syntax that require transformation are enum, namespaces (namespaces containing types only are allowed) and legacy modules.You need to pass the flag --experimental-transform-types to enable it. Decorators will soon be supported by V8 since they are a stage 3 proposal. We decided not to polyfill it but to wait the V8 relase.

Re: Node.js enables TypeScript handling by default

#8
post #5

Earlier quoted context omitted.

Can we have short explanation on the features supported? It is not clear on the doc which ones launched now? waiting for JS Decorator feature? Does it mean that any type mentioned in https://www.typescriptlang.org/docs/handbook/2/everyday-type... is supported? Any exception to this list? or additional? For feature depends on JS Decorator, that involves transformation, what are those? I saw enums and namespaces. Any l…

The flag --experimental-strip-types has been enabled by default. Only syntax that dont require transformation is allowed. Syntax that require transformation are enum, namespaces (namespaces containing types only are allowed) and legacy modules.You need to pass the flag --experimental-transform-types to enable it. Decorators will soon be supported by V8 since they are a stage 3 proposal. We decided not to polyfill it…

Thanks Marco