Skip to content
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

Move TypeScript defs to own folder and add tests #245

Merged
merged 1 commit into from
Apr 29, 2017

Conversation

lostfictions
Copy link
Contributor

Here's a PR for testing TS defs, as discussed in #244. It doesn't test them against the existing spec file -- between Karma augmenting the global namespace and the spec importing some Flow files, it ended up being a bit too tricky. Instead, this PR adds a tests.tsx file that simply verifies that the correct props are supported (as well as being optional.)

(When microsoft/TypeScript#15160 lands it'll be possible to enforce that Draggable and DraggableCore have a child as well.)

I've also added invoking tsc to perform the checking as part of the test task in Makefile.

@lostfictions
Copy link
Contributor Author

(Incidentally, spotted some invalid/deprecated props in the spec while I was looking things over:

Not sure why these aren't throwing via PropTypes verification but I don't have any more time to investigate this, sorry :( Just thought I'd point them out!)

@STRML STRML merged commit a31c5bb into react-grid-layout:master Apr 29, 2017
@STRML
Copy link
Collaborator

STRML commented Apr 29, 2017

Thanks. I removed the root index.d.ts and updated the lockfile. I tested a few invalid definitions and it threw as expected. I appreciate it a lot!

@lostfictions lostfictions deleted the typescript-tests branch April 29, 2017 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants