TypedJson<TU>: TU extends keyof TypeFromUrl
    ? TypeFromUrl[TU] & {
        @type: TU;
    }
    : {
        @type: string;
    }

The encoding introduced in Protobuf 3 for Any that can be serialized to JSON.

Technically JSON is a string, a notation encoding a JSON object. So this is more accurately "JSON-ifiable" but we don't expect anyone to confuse this type with a string.

Type Parameters

  • TU extends unknown | keyof TypeFromUrl = unknown