Skip to content

Commit

Permalink
Fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Aug 26, 2018
1 parent 0e9c470 commit 3ce9686
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/babel-types/src/traverse/traverseFast.js
@@ -1,10 +1,14 @@
// @flow
import { VISITOR_KEYS } from "../definitions";
import type { Node } from "@babel/types";

// This workaround is needed because BabelNode doesn't have a "type" property,
// which is only defined by its subclasses.
type _Node<T: BabelNode & { type: string }> = T;
type Node = _Node<*>;

opaque type Stop = Symbol;

type EnterCallback = (node: Node, opts: ?Object, parent: ?Node) => Stop | void;
type EnterCallback = (node: Node, opts?: Object, parent?: Node) => Stop | void;

type TraverseFast = {
(node: Node, enter: EnterCallback, opts?: Object): void,
Expand Down

0 comments on commit 3ce9686

Please sign in to comment.