dynogels icon indicating copy to clipboard operation
dynogels copied to clipboard

Add Typescript Declarations

Open naerbnic opened this issue 6 years ago • 5 comments

Added index.d.ts that contains the typings (as I have read them) from the rest of the library.

naerbnic avatar Nov 16 '17 19:11 naerbnic

If you see any problems with the typings given here, or if you have any idea of the right way to test this, I'm happy to hear it.

One thing I was thinking is rewriting one or more examples to use Typescript instead, and check that the usage of the library matches them.

naerbnic avatar Nov 16 '17 19:11 naerbnic

Coverage Status

Coverage remained the same at 98.66% when pulling 4f942b0a0b766a114ecbfbaf1a7e58aa351769b3 on naerbnic:add_typescript_declarations into 9678b7db3c0e170d184f559dd355a54d4871cb57 on clarkie:master.

coveralls avatar Nov 16 '17 19:11 coveralls

@naerbnic If you write some examples for the README.md then I think this is good to merge, right?

jkav77 avatar Jan 02 '18 19:01 jkav77

I don't think tests are required. However, these definitions would need updating any time we make changes to our API. Do we have the manpower+discipline+expertise to keep these definitions up to date? @clarkie @dangerginger

cdhowie avatar Apr 09 '18 02:04 cdhowie

There is a declaration file and example usage available in DefinitelyTyped (@types/dynogels), but it is definitely preferable for types to be maintained here alongside the library. I've been using those without issue, I haven't looked at the differences in depth but there are at least a few things that could be added to this one, or might be best to just copy the other one

stephentuso avatar May 10 '18 15:05 stephentuso