-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Exposing TypeOverrides from the library's root #2369
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
Conversation
`TypeOverrides` is too important not to expose it. It should be available from the root. Related: brianc#1838, brianc#2363
Thanks for this - this seems reasonable, but could you write some tests which will both prevent this from regressing & also demonstrate how this would be useful? |
It's just type exposure through variable, why do you need tests for that? And as for how this is help full, I explained it from start:
i.e. the lack of the type makes it very awkward to use it from TypeScript, with direct file inclusion and all. Especially because that extension is a class, and needs proper TypeScript class declaration. |
Otherwise in the future it might get unexposed & then we wouldn't know we're breaking anything until we release a version w/o it exposed. So just a simple check to make sure it's there is fine. |
It would be great to get this merged.
Are there existing tests for exports that this can be added to? |
definitely. I'll have to redo this since there's a merge conflict & its lacking tests, but its a very small change. I'll get a PR put up today & reference this one. |
closed in #3433 |
TypeOverrides
is too important not to expose it. It should be available from the root.It is essential part of custom type parsing, for which singleton
types
is exposed, whileTypeOverrides
is not.One of the big issues the current implementation has - impossible to properly declare the type in TypeScript, since it is a class, which we have to use as
any
interface instead (it's awkward).Related: #1838, #2363