Skip to content

Commit

Permalink
Add links to DynamicTypes from intro pages (#1116)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Adds links to Dynamic Types documentation in `supported-types.mdx` for
`enum` and `class` sections.
> 
>   - **Documentation**:
> - Adds links to [Dynamic Types](/docs/calling-baml/dynamic-types) in
`supported-types.mdx` under `enum` and `class` sections.
> - Provides guidance for adding new variants to `enum` and fields to
`class` dynamically.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 1119858. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
imalsogreg authored Oct 28, 2024
1 parent 4c3970a commit 8ce0a53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/docs/snippets/supported-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ enum Name {
}
```

If you need to add new variants, because they need to be loaded from a file or fetched dynamically
from a database, you can do this with [Dynamic Types](/docs/calling-baml/dynamic-types).

### class

**See also:** [Class](/docs/snippets/class)
Expand All @@ -273,6 +276,9 @@ class Car {
}
```

If you need to add fields to a class because some properties of your class are only
known at runtime, you can do this with [Dynamic Types](/docs/calling-baml/dynamic-types).

### Optional (?)

A type that represents a value that might or might not be present.
Expand Down

0 comments on commit 8ce0a53

Please sign in to comment.