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
super
method not present in type declarations
#10075
Comments
Hey @jhpratt! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
I'm not a TS expert, but how could we write this type definition so that it is valid code? export function super() {} |
@nicolo-ribaudo It's my understanding type definitions are auto-generated, so I'm not sure where the error is truly at. A simple definition like |
No, |
I figured we can do declare function _super(): Super;
export { _super as super } |
Fixed by #10098 |
Bug Report
Current Behavior
Calling
t.super()
results in a compile-time type error, assuper
isn't present in type definitions. It does exist in the documentation and works as expected after compilation.Expected behavior
The
super
method should be present in the type definitions.Babel Configuration (.babelrc, package.json, cli command)
Not applicable.
Environment
As someone using TypeScript to minimize errors, the amount of casting is extremely verbose. By itself, that's not an issue, but coupled with errors in type definitions (this along with #10065) are forcing the use of unsafe casts and
// @ts-ignore
.The text was updated successfully, but these errors were encountered: