This class is responsible for a binding inside of a scope.

It tracks the following:

  • Node path.
  • Amount of times referenced by other nodes.
  • Paths to nodes that reassign or modify this binding.
  • The kind of binding. (Is it a parameter, declaration etc)

Constructors

Properties

constant: boolean
constantViolations: NodePath<Node>[]
hasDeoptedValue: boolean
hasValue: boolean
identifier: Identifier
path: NodePath<Node>
referencePaths: NodePath<Node>[]
referenced: boolean
references: number
scope: Scope
value: any

Methods

  • Returns void

  • Returns void

  • Decrement the amount of references to this binding.

    Returns void

  • Register a constant violation with the provided path.

    Parameters

    Returns void

  • Increment the amount of references to this binding.

    Parameters

    Returns void

  • Parameters

    • value: any

    Returns void