Missing type definitions for Typescript
Request: A type definitions file (.d.ts) that allows react-data-grid to be integrated with projects using Typescript would be awesome!
I would also be happy to help to get this done :)
hey @aksingh -- yeah i've thought about that too. traditionally we were using Flow (and in fact still have an exe in our repo) but over time abandoned it until it's at least officially supported on Windows.
Typings could definitely be an alternate route to go down, but my two cents are that I don't know if it's really worth it right now.
TypeScript doesn't handle nulls as well as Flow or handle things like algebraic data types, but equally Flow is a pain to set up and is still pre-release on Windows. That being said, TypeScript does have things like union types which would probably cover most cases..
So just in my opinion, I think we should wait a bit until they've both matured before revisiting the decision then. Or it could be that we adopt typings right now, but see how Flow compares later?
What does everyone think? :smile:
I think Typescript is established well enough that I would go with the 2nd option of adopting typings now (it does not break anything) and perhaps also add flow support later?
I'm waiting for the react-data-grid to support TypeScript and its definition file.
Also, TypeScript provides union type: https://www.typescriptlang.org/docs/handbook/advanced-types.html
@malonecj @jpdriver I wrote some typings for DefinitelyTyped, you can check them out here. Please let me know if I missed anything, exposed something I wasn't supposed to, etc.
@SupernaviX Thanks you so much! Should be installed like this:
typings i react-data-grid --save --source dt --global
and imported like this:
import * as ReactDataGrid from 'react-data-grid';
Looks like this is already supported. Will close it, if there is anything missing fell free to open a new issue. Cheers.