Class JSTypeResolver

java.lang.Object
com.google.javascript.rhino.jstype.JSTypeResolver

public final class JSTypeResolver extends Object
A state machine for resolving all JSType instances.

This object shares the lifecycle of a registry. Consider it as a narrow interface into the registry for the purpose of resolving types.

Every time a new type is constructed it is (by cooperation of the JSType subclasses} added to this resolver. Depending on the state of the resolver at the time of addition, the type will either be eagerly resolved, or stored for later resolution.

  • Method Details

    • openForDefinition

      @MustBeClosed public JSTypeResolver.Closer openForDefinition()
      Allow new types to be created without eagerly resolving them.

      This is required by, and only really useful for, type definition. Types being derived from previously defined types should not contain reference cycles, and so should be eagerly resolvable.