How to use the isRestElement function from @babel/types
Find comprehensive JavaScript @babel/types.isRestElement code examples handpicked from public code repositorys.
GitHub: yandex/reselector
104 105 106 107 108 109 110 111 112 113
} else if (t.isObjectPattern(props)) { /** * Add property */ const restProps = props.properties.find(p => t.isRestElement(p)) if (restProps) { ARG = restProps.argument.name CURR_ID = `${ARG}['${PROP_NAME}']`
10
44
10
+ 9 other calls in file
14 15 16 17 18 19 20 21 22
const params = node.params; for (let i = 0; i < params.length; i++) { const param = params[i]; if (t.isAssignmentPattern(param) || t.isRestElement(param)) { return i; } }
0
0
0
@babel/types.identifier is the most popular function in @babel/types (20936 examples)