Typescript #269
Replies: 3 comments 1 reply
-
Hello @jorenvandeweyer , I suggest to use also the path attribute so that imports can look very clean and verbose. Something like "paths": {
"@grants/*": ["lib/grants/*"],
"@models/*": ["lib/models/*"],
... and so on....
}
What do you think? |
Beta Was this translation helpful? Give feedback.
-
From my end we can start with this and move to TS step by step. This is also a good way for me to get into TS. One note - we should keep the documentation examples in JS to stay as inclusive as possible. |
Beta Was this translation helpful? Give feedback.
-
Don't ask me how I ended up here, but my 2 cents on the subject would be to consider JSDoc instead.
A library like Svelte decided to drop TS in favour of JSDoc. You still keep type checking (+ all the perks like documentation, etc.), plus it allows you to do things incrementally. Just some food for thought ;) |
Beta Was this translation helpful? Give feedback.
-
There has been a few times a suggestion to rewrite this library in TypeScript, and even a few times a PR was opened featuring a full rewrite, which we had to decline due to major changes in the code base.
Since @jankapunkt started rewriting the library in ES6+ (#212) instead of ES5 (thank you for that! 🎉 ), I think we finally can start migrating to typescript without major changes to the codebase.
I think we first should decide how our tsconfig should look like before we start writing any code.
I think we can start from this
tsconfig.json
fileBeta Was this translation helpful? Give feedback.
All reactions