-
Notifications
You must be signed in to change notification settings - Fork 3
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 #2
Comments
You can (sort of) use typescript right now! I am saying sort of because I really rushed the typescript conversion, Pretty sure custom status methods like It should be sort of useable, I have used it myself. |
Okay will try to put time if I can add other missing typings. Thank you! |
@SweetMNM I am having this error import Spinnies from 'dreidels'
const spinnies = new Spinnies() // typescript error: This expression is not constructable |
I'm using it as an esm and have to import it like this to make it work import { default as Spinnies } from 'dreidels'; |
I have to use this approach: /* eslint-disable new-cap */
import Spinnies from 'dreidels'
// @ts-expect-error something wrong with package
const spinnies = new Spinnies.default() ref on code where the approach used: OleksandrKucherenko/chatgpt-translate-md#4 |
i'm gonna add it here because it's about TS: the type for the Animation option is wrong when using spinners from cli-spinner |
but i think this project is dead because @SweetMNM has not been active on Github at all since about a year ago |
I have been a busy with other stuff yeah. When I tried to update the project to properly support ts and also commonjs and esm at the same time it was too confusing, especially since I haven't been using node for a while at that point. I think functionality wise the project is pretty complete (I am glad with how it turned out). If anyone that has some experience with esm modules wants to PR I will gladly test it out and merge when I get the chance :) |
Hi, love this project! one question though: what node versions do you want to support? (probably Node 14 and up i expect?) |
and also: some of the dependencies have put out new versions where they better support esm, i think it would be a good idea to upgrade some of them
|
i just found this article that describes an easy solution to the problem: |
Last time I used node I think the latest was 12 lol. Try to support as back as possible as long as it's not too much trouble, not sure what it depends on but I trust that you make the right decision on it. |
Feel free to update them, I will take a look at the new versions you upgrade to. Shouldn't be a problem. Thanks for working on this! |
I think i'm going to try to support node 12 and up and run local tests to see if the versions work 👍 |
i just looked it up, Node 12 LTS and Node 14 LTS have reached end-of-life a while ago, current officially supported node versions are Node 18 (Maintenance), Node 20 (LTS), Node 21 (Current) |
Is there a plan for typescript?
The text was updated successfully, but these errors were encountered: