Debian Codegraph @

node/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts

raw
1 import type { Message } from "../types.js";
2 import type { BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, UInt32Value, UInt64Value } from "./gen/google/protobuf/wrappers_pb.js";
3 import type { DescField, DescMessage } from "../descriptors.js";
4 export declare function isWrapper(arg: Message): arg is DoubleValue | FloatValue | Int64Value | UInt64Value | Int32Value | UInt32Value | BoolValue | StringValue | BytesValue;
5 export type WktWrapperDesc = DescMessage & {
6 fields: [
7 DescField & {
8 fieldKind: "scalar";
9 number: 1;
10 name: "value";
11 oneof: undefined;
12 }
13 ];
14 };
15 export declare function isWrapperDesc(messageDesc: DescMessage): messageDesc is WktWrapperDesc;
16 /**
17 * Returns true if the descriptor is a well-known type with a custom JSON
18 * representation per the protobuf JSON spec. Examples: Timestamp as an
19 * RFC 3339 string, Duration as "5s", wrappers as the unwrapped scalar.
20 *
21 * When packed inside `google.protobuf.Any`, these messages are serialized
22 * as `{"@type": ..., "value": <custom form>}`; all other messages embed
23 * their fields directly.
24 */
25 export declare function hasCustomJsonRepresentation(desc: DescMessage): boolean;