roxiness / stackmix

A collection of templates for Routify.
22 stars 2 forks source link

Typescript support #26

Open joshua1 opened 3 years ago

joshua1 commented 3 years ago

Hi @dominikg and @jakobrosenberg, 👍 first on this. I wanted to ask if there are any plans to include typescript support since routify and vite supports it , and give users the option to choose between TS or JS

jakobrosenberg commented 3 years ago

I don't know enough about implementing Typescript to dynamic structures to know if this is possible. @lamualfa might know more about this.

@joshua1 is this something you'd be interested in maintaining if we can add it?

joshua1 commented 3 years ago

@jakobrosenberg Thanks for the quick reply. I would be interested in maintaining it. I am actually going through the source , looking at how it can be included .

jakobrosenberg commented 3 years ago

Sorry about the lack of documentation on the mechanics, if you have any questions feel free to ask here or on Discord. 🙂

dominikg commented 3 years ago

keep in mind that typescript requires more than just adding the dependencies. You need to transform existing js files to ts, maybe even add typings. svelte-preprocess and depending on other present fragments more stuff. some things might need to be done only for specific fragment combinations.

Havn't had a chance to check this out in depth, but my gut feeling is that you either need to do a complete split with something like stackmix-ts or have the ts fragment analyze what other fragments are present and then do it's thing.

Problems arise when ts fragment gets added later on. so A -> ts -> B.... now when adding B you need to rerun ts fragment to account for B special stuff ...