avallete / ag-grid-autocomplete-editor

Quick implementation of autocompletion into ag-Grid cell using autocompleter package.
MIT License
49 stars 25 forks source link

How can I use it with TypeScript #59

Closed jasp402 closed 4 years ago

jasp402 commented 4 years ago

How can I use it with TypeScript and reactjs When I install it, it still doesn't recognize it.

image

It is usually solved using:

npm i @types/ag-grid-autocomplete-editor -S
avallete commented 4 years ago

Hi there,

I've just tested it here: https://stackblitz.com/edit/typescript-uqpiu9

And haven't been able to reproduce your issue. I do ship the type definition file (.d.ts) with the package so it should work with typescript. Maybe an issue with your code editor with caching/indexing of the nodes_modules ?

Also, maybe shipping the .d.ts within the module isn't the smartest option (since if you don't use TypeScript you don't need it and it take space into the package). I will read some advise about that and keep this issue open to maybe refactor the way we include the types to the package.