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
@babel/types TypeScript definitions is missing some exported functions #8375
Comments
Hey @mgroenhoff! 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 |
Would you mind sending a PR? |
I am not really sure where to start TBH. I know those types are automatically generated but that's about it. Can you give me some directions on how to approach this? |
cloneNode is also missing from the type definitions |
@brandonkal Added! |
Fixed by #10098 |
Looking through my babel plugins, I found some more types that are missing: declare module '@babel/core' {
namespace types {
type VisitorKeys = {
[T in keyof AllNodes]: Extract<
keyof AllNodes[T],
{
[Key in keyof AllNodes[T]]: AllNodes[T][Key] extends (
| t.Node
| t.Node[]
| null)
? Key
: never;
}[keyof AllNodes[T]]
>;
};
const VISITOR_KEYS: { [T in keyof VisitorKeys]: VisitorKeys[T][] };
const FLIPPED_ALIAS_KEYS: {
[T in keyof t.Aliases]: t.Aliases[T]['type'][];
};
function shallowEqual(actual: object, expected: object): boolean;
}
} I'll post this here as it is related, but I can open new issue if desired. |
Thanks all for taking this over! |
Bug Report
Current Behavior
I am trying to use the TypeScript definitions from
@babel/types
but I am missing some functions:babel/packages/babel-types/src/index.js
Lines 96 to 111 in a811cf7
Environment
The text was updated successfully, but these errors were encountered: