Class UnionType.Builder

    • Method Detail

      • addAlternate

        public UnionType.Builder addAlternate​(JSType alternate)
        Adds an alternate to the union type under construction.

        Returns this for easy chaining.

      • build

        public JSType build()
        Returns a type, not necessarily a UnionType, that represents the union of the inputs.

        The UnionType.Builder cannot be used again once this method is called.