-
Notifications
You must be signed in to change notification settings - Fork 250
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
No Typescript Definitions #59
Comments
This would be great for functions as well as the different objects the Trello API offers! If I can find some free time I might take a crack at this. |
I have started work on this and will be continuing over the next few weeks and will then submit a PR. Initial work is here: https://github.com/karlvr/trello/blob/types/index.d.ts If anyone has made more progress, please let me know and I'll instead contribute to your effort! There doesn't appear to be a canonical definition of the Trello API, unfortunately. The API documentation seems to gloss over and just simply omit thing! I guess that will make this something of a moving target. |
I've combined this with #74 and I've written a script to automatically generate the types, resulting in https://github.com/karlvr/trello/blob/types-query/index.d.ts There's obviously more model types to make, but it's a start and the automatic generation script makes it pretty easy to keep up to date. |
@karlvr Do you have an example of how to use your typings? |
@sheam I have included them in the |
@karlvr so in package.json
Then in code:
This gives me: "trello_1.Trello is not a constructor".
This gives me: "trello.Trello is not a constructor". |
@sheam how did you import it? It should be: import Trello from 'trello' and then you should be able to use it: const t = new Trello('key', 'token'); |
Hey, any updates here? |
Hey, anything new? I will be glad to help, just don't want to do any duplicate work |
@vaagnavanesyan @ohadch nothing from me. My changes were sufficient for my efforts. I'm not sure whether anyone else has got them working? |
It'd be awesome if there were some! ✨
The text was updated successfully, but these errors were encountered: