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

omniscient.d.ts #128

Open
reverofevil opened this issue Jan 18, 2016 · 6 comments
Open

omniscient.d.ts #128

reverofevil opened this issue Jan 18, 2016 · 6 comments

Comments

@reverofevil
Copy link

Is there any support for TypeScript planned?

@mikaelbr
Copy link
Member

Not officially planed. Did think about doing it earlier, but haven't gotten around to it yet. But AFAIK, anyone could create a type definition and add it to e.g. http://definitelytyped.org/?

@reverofevil
Copy link
Author

@mikaelbr Yeah, I'm already up to this painful task. The problem is that there's also no immstruct.d.ts, and immutable.d.ts exists, but is unavailable from DefinitelyTyped.

@reverofevil
Copy link
Author

Some preliminary code is here, yet react.d.ts turned up to be buggy to the backbone. A simple "hello world" script with onChange on an input doesn't let into e.target.value, because e.target has an abstract NodeElement type. It's easily fixed with unsafe type cast by eager TS fans, yet it destroys all the profit from static typing. I think there's no easy way to use anything near to React in TypeScript currently. I hesitate fixing bugs in react.d.ts until I get sure Facebook is interested in any PRs, because otherwise it's going to be yet another incompatible react.d.ts.

@mikaelbr
Copy link
Member

Ah. Good work and thanks for your efforts! Sad to hear that the type descriptions aren't up to par in React or Immutable.js, but hope to see it improve through your work. Just let me know when you feel it makes sense to include or reference it from this repo.

@leonyu
Copy link

leonyu commented Jan 31, 2016

Saw this issue kind of late, I did have an immstruct type definition floating around here:
https://github.com/leonyu/DefinitelyTyped/tree/immstruct/immstruct
Although my version used generics (with "abstract cursor implementation"), which is less intuitive to work with, but didn't require reference to cursor.d.ts. I went down that route because I was hoping to be able to do it w/o actual having a reference to cursor.d.ts definition, but user experience of that is a lot worse, so I didn't try to get it merged.)

@polkovnikov-ph I might port over the tests I have into your branch.

I have been working through the Facebook licensing problem here DefinitelyTyped/DefinitelyTyped#6623, but I was on vacation the past few weeks. Seeing that the original contributor of that PR is no longer active, I just created DefinitelyTyped/DefinitelyTyped#7890, hopefully that would get merge in a week or two.

@reverofevil
Copy link
Author

@leonyu Great!

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

No branches or pull requests

3 participants