Add types#1557
Conversation
|
Just FYI so we don't duplicate work again: I also did this in a branch but threw it away to work on a typescript migration instead. To be clear, don't start migrating to typescript, otherwise this will be the third time we have done the same work in parallel 😂 As a precursor to that, this would be a good one to merge. |
|
Couple of things I did different that may be worth considering:
|
|
I feel like I've underestimated the amount of work we'd need to do to get types to work :D
Yeah I think we should enforce this with a ESLint plugin. |
it may be possible to just strongly type the exposed API and cast internally where needed for now. if you start fixing up all the type errors etc, you're verging on converting it to typescript already. that is exactly what lead me to it - i was fixing up enough types that i realised i may as well be writing typescript... to avoid doing the same effort twice (once in jsdoc, once in type annotations). im on a different laptop to the one with my typescript branch for the next few days, but once im back on there i'll push what i have |
No description provided.