fix typescript for babel-types#10098
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10956/ |
43d2917 to
5b83530
Compare
|
LGTM. I'd obviously prefer Babel used TS over Flow, as it's far more popular, but this PR should fix the issues I've found, at least. Edit: Looking at CI, there's one instance where you put |
5b83530 to
4b39d4b
Compare
Oops, because I copied over from |
4b39d4b to
6467cd1
Compare
| } else { | ||
| const functionName = toFunctionName(type); | ||
| lines.push( | ||
| `declare function _${functionName}(${args.join( |
There was a problem hiding this comment.
Maybe this should be export declare function ${type}? They always start with an uppercase letter (thus are valid identifiers), and it would match https://github.com/babel/babel/blob/6467cd1e27ffe2a3a1cfe97bc8c67b407cb1e7c4/packages/babel-types/src/builders/generated/index.js
There was a problem hiding this comment.
no. this is for the edge case of super() and import() where you can't export declare function super(): SuperNode;
but instead I made it:
declare function _super(): SuperNode;
declare export { _super as super };to workaround of not being able to export super and import
|
CircleCI failure is unrelated. |
Uh oh!
There was an error while loading. Please reload this page.