function inspectObjectPatternForKeys(node) {
  // if it has computed props or a RestElement, we cant meaningfully pursue any deeper
  // so return a single empty path, meaning "one result, the whole thing"
  const expansionForbidden = node.properties.some(
    (prop) =>
      /** @type {import('@babel/types').ObjectProperty} */ (prop).computed ||
      prop.type === 'RestElement'
  )
  if (expansionForbidden) {
    return [[]]
  }
  // expand each property into a path, recursively
  /** @type {string[][]} */
  let keys = []
  const properties = /** @type {import('@babel/types').ObjectProperty[]} */ (
    node.properties
  )
  properties.forEach((prop) => {
    if ('name' in prop.key) {
      const propName = prop.key.name
      const child = prop.value
      keys = keys.concat(
        inspectPatternElementForKeys(child).map((partial) => [
          propName,
          ...partial,
        ])
      )
    }
  })
  return keys
}
@param {import('@babel/types').ObjectPattern} node
@returns