Skip to content

[V] $lib

const $lib: TypeSpecLibrary<{
anonymous-model: {
default: "anonymous models cannot be used in Protobuf messages";
};
field-index: {
invalid: CallableMessage<["index"]>;
missing: CallableMessage<["name"]>;
out-of-bounds: CallableMessage<["index", "max"]>;
reserved: CallableMessage<["index"]>;
user-reserved: CallableMessage<["index"]>;
user-reserved-range: CallableMessage<["index"]>;
};
field-name: {
user-reserved: CallableMessage<["name"]>;
};
illegal-reservation: {
default: "reservation value must be a string literal, uint32 literal, or a tuple of two uint32 literals denoting a range";
};
invalid-package-name: {
default: CallableMessage<["name"]>;
};
model-not-in-package: {
default: CallableMessage<["name"]>;
};
namespace-collision: {
default: CallableMessage<["name"]>;
};
nested-array: {
default: "nested arrays are not supported by the Protobuf emitter";
};
package: {
disallowed-option-type: CallableMessage<["name", "type"]>;
};
root-operation: {
default: "operations in the root namespace are not supported (no associated Protobuf service)";
};
unconvertible-enum: {
default: "enums must explicitly assign exactly one integer to each member to be used in a Protobuf message";
no-zero-first: "the first variant of an enum must be set to zero to be used in a Protobuf message";
};
unspeakable-template-argument: {
default: CallableMessage<["name"]>;
};
unsupported-field-type: {
recursive-map: "a protobuf map's 'value' type may not refer to another map";
unconvertible: CallableMessage<["type"]>;
union: "a message field's type may not be a union";
unknown-intrinsic: CallableMessage<["name"]>;
unknown-scalar: CallableMessage<["name"]>;
};
unsupported-input-type: {
unconvertible: "input parameters cannot be converted to a Protobuf message";
wrong-number: "Protobuf methods must accept exactly one Model input (an empty model will do)";
wrong-type: "Protobuf methods may only accept a named Model as an input";
};
unsupported-intrinsic: {
default: CallableMessage<["name"]>;
};
unsupported-return-type: {
default: "Protobuf methods must return a named Model";
};
}, ProtobufEmitterOptions> = TypeSpecProtobufLibrary;