fix export of parameters when renaming the binding of exported functions - fixes #2753
This commit is contained in:
@@ -91,3 +91,21 @@ getBindingIdentifiers.keys = {
|
||||
VariableDeclaration: ["declarations"],
|
||||
VariableDeclarator: ["id"]
|
||||
};
|
||||
|
||||
export function getOuterBindingIdentifiers(
|
||||
node: Object,
|
||||
duplicates?: boolean,
|
||||
): Object {
|
||||
if (t.isFunction(node)) {
|
||||
let id = node.id;
|
||||
if (id) {
|
||||
return {
|
||||
[id.name]: duplicates ? [id] : id
|
||||
};
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
} else {
|
||||
return getBindingIdentifiers(node, duplicates);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user