-
Notifications
You must be signed in to change notification settings - Fork 113
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
feature: typescript declaration file support? #99
Comments
Yes, let me have a look it should be possible since most of the method signatures are already quite well documented. |
Because I use typescript. If module without declaration file, tsc would show a error. 😂 |
i'm also hoping to use the |
@dcunited001 Yes you are right, I made a stab at a ts file a few weeks ago but am now swamped with work. Anyone that wants to help is welcome to fork and fix the definitions themselves. I estimate they should be 75 % done by now. |
@tedeh for now, we're moving ahead only using the jayson client on the backend, but i would prefer to use it on the frontend. i'm just getting started with typescript myself, but if i get a chance, i'll try to take a shot at it. |
Is there any progress? |
I feel mostly finished with the Typescript implementation, anyone can add it to their project by checking out the Would be good if anyone could write any feedback here ... The type definitions are probably not going to be merged into Here are the type definitions: https://github.com/tedeh/jayson/blob/typescript/index.d.ts |
If the "noImplicitAny" config is set to "true" you get the following errors:
Easy fix just add : any as a result for these 5 functions. ( or a real type if applicable ) Everything else seems to be good. I'll add feedback here as I encounter something. |
Thanks for the feedback, the problems with Any more help appreciated... |
In examples: server.js called the method:
|
Thanks @luozhihua unfortunately I couldn't manage to alias |
The type definitions have been published in |
@tedeh Just using uppercase Server won't do the trick, it's a class, not a function. |
I use typescript with jayson, but there's no typescript declaration file.
Can you support it?
The text was updated successfully, but these errors were encountered: