diff --git a/acorn-walk/dist/walk.d.ts b/acorn-walk/dist/walk.d.ts index a02c0a186..f452bf75b 100644 --- a/acorn-walk/dist/walk.d.ts +++ b/acorn-walk/dist/walk.d.ts @@ -1,9 +1,7 @@ import acorn from 'acorn'; declare module "acorn-walk" { - type NodeType = acorn.Node["type"]; - type DiscriminateUnion = T extends Record ? T : never; - type NarrowNode = DiscriminateUnion; + type NodeType = acorn.Node["type"]; type FullWalkerCallback = ( node: acorn.Node, @@ -20,18 +18,18 @@ declare module "acorn-walk" { type WalkerCallback = (node: acorn.Node, state: TState) => void; type SimpleWalkerFn = ( - node: NarrowNode, + node: acorn.Node, state: TState ) => void; type AncestorWalkerFn = ( - node: NarrowNode, + node: acorn.Node, state: TState| acorn.Node[], ancestors: acorn.Node[] ) => void; type RecursiveWalkerFn = ( - node: NarrowNode, + node: acorn.Node, state: TState, callback: WalkerCallback ) => void; @@ -51,7 +49,7 @@ declare module "acorn-walk" { type FindPredicate = (type: NodeType, node: acorn.Node) => boolean; interface Found { - node: NarrowNode, + node: acorn.Node, state: TState }