trello
trello copied to clipboard
No Typescript Definitions
It'd be awesome if there were some! :sparkles:
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 package.json
, so if you include the library from my fork you magically get the typings. No need to install them separately.
@karlvr so in package.json
"trello": "https://github.com/karlvr/trello"
},
Then in code:
const t = new Trello('key', 'token');
This gives me: "trello_1.Trello is not a constructor".
const t = new trello.Trello('', '');
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?