Provides utilities used by generated code. All methods are internal and are not safe to use, they may break with a future release.

interface Util {
    clone<T>(message): T;
    equals<T>(type, a, b): boolean;
    initFields(target): void;
    initPartial<T>(source, target): void;
    newFieldList(fields): FieldList;
    setEnumType(enumObject, typeName, values, opt?): void;
}

Methods

  • Create a deep copy.

    Type Parameters

    Parameters

    • message: T

    Returns T

  • Compares two messages of the same type recursively. Will also return true if both messages are undefined or null.

    Type Parameters

    Parameters

    Returns boolean

  • Set default field values on the target message.

    Parameters

    Returns void

  • Set specified field values on the target message, recursively.

    Type Parameters

    Parameters

    Returns void

  • Create a field list

    Parameters

    Returns FieldList

  • Sets reflection information on a generated enum.

    Parameters

    Returns void

Generated using TypeDoc