In working on the release notes, I realize a lot of the documentation involves being very specific about all the different overloads we support.
For TypeScript users – and indeed many non-TS users whose editors interpret the TypeScript defs – the type definitions will be the most useful way to understand how to use the functions.
I'd like to propose that we bring the type definitions in house and maintain them in this repository. This should make it easier to keep the types in sync with the API as it changes, increases the likelihood that the types are correct, and lets use ship up-to-date types in unreleased branches (e.g. future beta branches).
As TypeScript has become really common, I think it's reasonable to consider it a core part of the library's use case, rather than a fringe part.
In working on the release notes, I realize a lot of the documentation involves being very specific about all the different overloads we support.
For TypeScript users – and indeed many non-TS users whose editors interpret the TypeScript defs – the type definitions will be the most useful way to understand how to use the functions.
I'd like to propose that we bring the type definitions in house and maintain them in this repository. This should make it easier to keep the types in sync with the API as it changes, increases the likelihood that the types are correct, and lets use ship up-to-date types in unreleased branches (e.g. future
betabranches).As TypeScript has become really common, I think it's reasonable to consider it a core part of the library's use case, rather than a fringe part.