Open History to see the last commit
1import { AST_NODE_TYPES } from '@typescript-eslint/utils'
2import type { TSESTree } from '@typescript-eslint/utils'
3β
4export const NoRestDestructuringUtils = {
5 isObjectRestDestructuring(node: TSESTree.Node): boolean {
6 if (node.type !== AST_NODE_TYPES.ObjectPattern) {
7 return false
8 }
9 return node.properties.some((p) => p.type === AST_NODE_TYPES.RestElement)
10 },
11}