As discussed here: https://github.com/developit/preact/pull/737#issuecomment-346050695
The TS improvements PR above has been open for half a year. This is discouraging to the contributor. This one has been open for more than a year. 7 out of 8 of the PR's that are currently open are TS related, and 3 have been approved.
Perhaps the type definitions should be moved to DefinitelyTyped so they can be updated more quickly (and removed from this repository).
Agreed! I'd love to move things to DefinitelyTyped if that makes it easier to collaborate.
I do not know if that makes sense. It looks more like a split to me. If the maintainers of preact do not feel like supporting typescript (for whatever reason), the corresponding definition types should never have landed in the preact package.
If the problem is the language (typescript, flow or whatever new lands), it should be clear to the community. If the problem is the resources, the community can still help :)
But in case of A, I would suggest to do it right removing preact.d.ts from the preact package and simultaneously publishing @types/preact.
That said, I am personally against that solution
Definitely not wanting to second-class TypeScript or Flow! For me personally, these are just things I've not yet had the chance to dive into, so I'm somewhat useless when reviewing PRs. I'm hoping to start using TypeScript though, perhaps it'd be advantageous to port preact to it in its entirety.
Thank you both. I think the most important thing for TS users is to provide the best possible TS type definitions. This makes Typescript as effective as possible. Ideally these are bundled with the library, but having the best possible typings available is more important than having them bundled imo.
I understand if you don't want to merge things if you aren't sure about their quality because you're not a TS user. If there is no contributor you can trust with reviewing those contributions, I think it is better to move the type definitions to DefinitelyTyped where they can be reviewed so we can have the best possible type definitions.
@developit I personally do not see it as second classing TS os Flow by saying, sorry guys we are not good at it, use third party definitions. What I see as second classing is the current situation where PRs related to types are getting rotten without a clear Yes or No.
Either get someone you trust to review such PRs or just make it clear that they will not get merged.
My opinion is to provide tests for the types (the base can be found at #737) and enforce new tests covering type changes in the future. DefinetelyType does nothing different than that and it looks like it works. With time your uncertainty will just go away.
I'd still love to see a straight TS port of Preact's code. If someone was interested in hacking on that, I would happily make that my reason for learning TS ;)
Most helpful comment
I'd still love to see a straight TS port of Preact's code. If someone was interested in hacking on that, I would happily make that my reason for learning TS ;)