keepthatworktoyourself / wombat

Not another website builder. Public repo — raise issues, request features, get help.
2 stars 0 forks source link

Types #281

Open bhallstein opened 1 year ago

bhallstein commented 9 months ago

Some thoughts

Where we are now

A large-scale switch to typescript

JSDoc

The API (in front-end)

Backend

What should we do? Dunno, but these are my current thoughts:

Overall I think there are probably some easy wins, but unfortunately we prob need to fix the few hundred errors first off. A lot of this might be just adding default values like = null to component props.

What I'm imagining is a mix of JS and TS, with TS mostly in definition files/utils, and would diverge significantly from accepted TS best practice, with e.g. free reign to use any for convenience. Basically my thinking is to sprinkle in some TS where there are simple wins and where necessary for our developer tooling, and maybe a hybrid approach with JSDoc where that's easier and perhaps in shared utils that also need to be used by backend code.