Add more compat logic for Rest/SpreadElement for 6.x vs 7.x
This commit is contained in:
@@ -64,6 +64,14 @@ for (const type in t.VISITOR_KEYS) {
|
||||
registerType(type);
|
||||
}
|
||||
|
||||
// Compat helpers so code for Babel 6.x is more likely to work on Babel 7.x.
|
||||
export function isRestProperty(...args) {
|
||||
return t.isRestElement(...args);
|
||||
}
|
||||
export function isSpreadProperty(...args) {
|
||||
return t.isSpreadElement(...args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flip `ALIAS_KEYS` for faster access in the reverse direction.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user