Documentation

HomeBAMLCLICloudTutorialsExamples

BAML documentation

  • Overview
  • Get started
  • Book
    • 3. Common programming concepts
    • 8. Handle errors
    • 11. Interfaces
    • 12. Run work concurrently
  • Language reference
    • Functions
  • Standard packages
  • Language bridges
    • TypeScript

Products

  • BAML CLI
  • Cloud

Resources

  • Tutorials
    • Structured extraction
  • Examples
    • Classify support tickets
    • Images and vision models
HomeBAMLCLICloudTutorialsExamples
Start

Sections

  • Overview
  • Get started
  • Book
    • 3. Common programming concepts
    • 8. Handle errors
    • 11. Interfaces
    • 12. Run work concurrently
  • Language reference
    • Functions
  • Standard packages
  • Language bridges
    • TypeScript

Products

  • BAML CLI
  • Cloud

Resources

  • Tutorials
    • Structured extraction
  • Examples
    • Classify support tickets
    • Images and vision models
BAMLStandard packagesv0.21.0reflectclassget_field

reflect.class.get_field

Assert-read a named field from a runtime-shaped class instance.

Reference version

Signature

function reflect.class.get_field<T>(
value: unknown,
name: string
) -> T throws reflect.errors.CompilationError

Assert-read a named field from a runtime-shaped class instance.

Source:<builtin>/reflect/ns_class/class.bamlbytes 5478–5596

Related definitions

  • reflect.errors.CompilationError

On this page

  • Signature
  • Related definitions

Build with BAML

Start with the language guide and a checked BAML function.

Continue into generated package and CLI references for the exact selected toolchain.

Get started
Developer documentation for BAML and Boundary products. Source available on GitHub. View release notes