Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
382 Bytes
import { AST_NODE_TYPES } from '@typescript-eslint/utils'
import type { TSESTree } from '@typescript-eslint/utils'
export const NoRestDestructuringUtils = {
isObjectRestDestructuring(node: TSESTree.Node): boolean {
if (node.type !== AST_NODE_TYPES.ObjectPattern) {
return false
}
return node.properties.some((p) => p.type === AST_NODE_TYPES.RestElement)
},
}