-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript support #163
Comments
Now Svelte supports TypeScript directly, please check out this post as a reference -> https://svelte.dev/blog/svelte-and-typescript |
Does anybody have an instruction on how to get this to work with TypeScript? |
Svelte Material UI currently does not have typescript types defined. You can still use this lib in your typescript project and create your own typescript components that consume this lib but Svelte Material UI components will remain untyped as you do so. |
yeah i've stopped using it, why not create @types |
any update on types? |
The current plan is to work on migrating to Typescript as the next major feature. It will take a lot of work, though. |
hi @hperrin, I love the project it has helped me a lot to dip my toes into Svelte :) |
Thank you. That does look promising. |
I've been using SMUI in a TypeScript project recently, and it reeeeeeeeally makes me want to spend a weekend translating this to TypeScript. |
Getting started on this today. I'm not sure how I'm going to handle events, since you can add ad hoc events with modifiers. Wish me luck. |
YO!!!! cf9c6af |
It seems like it's working! |
Based on how long it took to translate just that (very simple) component, "a weekend" was a very optimistic time frame. |
You can follow along with my progress here: |
Better yet, you can follow my progress in the newly created project: |
Closed with 331afa5! Fully typed SMUI!!! |
Hi, great to hear that! Could you please add some more detail about setting up
and I am not really sure about the issue as I already have Thnaks! |
@marekdedic Can you try with the latest beta? I fixed some type issues with the ".0" beta, so the ".1" beta might help. |
@hperrin It's still the same. I think it's probably just that my webpack config isn't 100% correct (but it works for my TS code), so better docs would be the way to go... |
I just tested it in Webpack myself, and I'm getting the same issue... |
I'm also having similar issues. I am using svelte-typescript, running the setup typescript step and then installing the smui button. it fails to compile: |
I've fixed most of the issue... I've got one more beta to publish that I think will fix the last parts. |
It worked! Typed SMUI works in Webpack now! |
Thanks! Unfortunately, I'm getting a different error now :/
|
That error seems to be fixed on beta 7, however, there is an even newer one :)
|
This should also be fixed now. :) |
Hello,
Are there plans to add Typescript support to this library? Looks great and love the library!
The text was updated successfully, but these errors were encountered: