import type { Node as _Node, JSXSpreadChild, BaseNode } from 'estree-jsx'; import type { ImportAttribute } from 'estree'; export type Node = _Node | JSXSpreadChild | ImportAttribute; export { BaseNode }; /** * Causes a compiler error if a switch is not exhaustive * or you can say causes a compiler error if all possible switch cases * are not covered * * This function would never get called in reality, if your code is correct */ export declare const assertNever: (x: never) => never; export type NodeMap = { [N in Node as `${N['type']}`]: N; }; export type NodeTypes = keyof NodeMap; export type NodeT = NodeMap[N]; export type ParentsOf = { [K in NodeTypes]: N extends NodeMap[K][keyof NodeMap[K]] ? NodeMap[K] : never; }[NodeTypes]; export type PossibleKeysInParent = Exclude<{ [K in keyof P]: N extends P[K] ? K : never; }[keyof P], undefined>; export declare const toCamelCase: (input: string) => string; /** Creates a clean object that doesn't have any prototype */ export declare const cleanObj: (obj: T) => T;