inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
48 stars 16 forks source link

Add Typescript to Svelte components #433

Closed maxlath closed 10 months ago

maxlath commented 11 months ago

Introducing Typescript on Svelte module, without necessarily doing more for now, could already provide benefits, such as detecting invalid/insufficiant component props.

See demo 6074cdaa8 ts_svelte_check

I followed recommendation from this article


While we could also start converting .js to .ts and get some benefits from it, for more indepth typing, I think it would be worth figuring out our typing setup on the server, possibly to then consume the server-produced types client-side (à la trpc?).