Re:Speeding up the JavaScript ecosystem – Isolated Declarations
by bikitan on Sunday July 07, 2024 @12:24AM
(#40895256)
But why would any of that need to be done manually in a .d.ts file? You can just write your type definitions in ts files
[ Parent
| on HN ]
Re:Speeding up the JavaScript ecosystem – Isolated Declarations
by austin-cheney on Sunday July 07, 2024 @12:47PM
(#40898738)
Types are meta data for the compiler. They are not code that is compiled to JavaScript, so I isolate my type definitions to d.ts files. That is the only reason I have d.ts files at all.
Re:Speeding up the JavaScript ecosystem – Isolated Declarations
by sharlos201068 on Monday July 08, 2024 @09:39AM
(#40905332)
Types are also documentation for the developers reading and editing the code.