@FezVrasta would you consider publishing a .d.ts file in the NPM package for typescript consumers? @types/popper.js is already a thing, but including types in the source package itself provides a more consistent experience. it also allows libraries to depend on your interfaces without introducing an @types dependency that is unnecessary for JS consumers.
i've been improving the @types definitions and could be ready with a PR today or tomorrow?
It would make sense but I see few concerns:
Keeping typings in the source package next to the source code is much better for maintenance than the current DefinitelyTyped / separate repo and publish flow situation!
Perhaps adding a line to .github/PULL_REQUEST_TEMPLATE.md would be enough to keep it in memory?
While I hear your _desire_ to support Flow, I don't feel any _need_ to do such a thing, nor can I really comment on that _ecosystem_ 🤷♂️
The fact is that for now this library doesn't officially support TS and the maintainance is up to the community.
If I'm going to include the types in this package I'll have to ask contributors to know about TS even if they don't use it. This is going to reduce the, already low, amount of contributors from the community to this project.
I could support a Flow definition because I use it in my daily work tho. So if away exists to write a single type def for both the technologies I would be able to maintain it.
i have yet to come across a tool to convert from Flow to TS, but there are some that attempt to convert from TS to Flow (albeit lossily and probably out of date).
(https://github.com/flowtype/flow-typed/pull/590 is a pretty neat discussion about generating flow-types using flowgen)
seems that, for now, the only reliable way to provide types for both TS and Flow is to maintain two separate definitions.
i am happy to accept TS maintenance duty for _this_ library as Blueprint will start using it imminently, so you'll suddenly have dozens of typescript consumers.
Ok I think we can give this a try. Thank you
@FezVrasta what's the path to cutting a release containing this change? happy to help however I can!
These days I'm not at home and I'm sick + personal stuff to do.
Once I'll be back to the normality I'm going to release a new version.
Most helpful comment
Ok I think we can give this a try. Thank you