Skip to content

Reference

Reference pages cover exact generated shapes, plugin options, runtime types, and edge cases. Use them when you need a specific behavior. For end-to-end workflows, see Getting started and the guide pages in the sidebar.

  • Generated code: file names, message shapes, enum generation, extension descriptors, and service schemas.
  • Field types: scalar mappings, message fields, enum fields, repeated fields, map fields, and well-known type field shapes.
  • Generated features: oneofs, proto2 groups, required fields, optional fields, services, reserved names, nested types, comments, and packages.
  • Plugin options: target, import extensions, CommonJS output, empty files, ts_nocheck, plugin version elision, JSON types, and Valid types.
  • Working with messages: create(), initializer objects, isMessage(), $typeName, field presence, equals(), and clone().
  • Serialization: binary and JSON helpers, options, unknown fields, low-level wire APIs, text encoding, Base64, and size-delimited streams.
  • Extensions: defining, setting, reading, mutating, clearing, and serializing extensions.
  • Reflection: overview and typed dynamic message patterns.
  • Descriptors: descriptor hierarchy, schema traversal, field descriptors, and traversal helpers.
  • Registries: descriptor lookup, mutable registries, and file registries from descriptor sets.
  • Custom options: defining, using, and reading schema annotations.
  • Dynamic messages: ReflectMessage, ReflectList, and ReflectMap.
  • Well-known types: precompiled google.protobuf exports and convenience helpers for Timestamp, Duration, Any, Struct, wrappers, descriptors, and compiler types.
  • JSON types: generated JSON types, enum JSON types, MessageJsonType, EnumJsonType, and plugin imports.
  • Valid types: experimental generated Valid types for required message-field guarantees.
  • Migrating from v1: package updates, changed plugin defaults, schema-based runtime calls, and notable v2 behavior changes.
  • FAQ: enum design, 64-bit integers, plugin-option philosophy, resolver issues, generated imports, and determinism.