diff --git a/fern/03-reference/baml/types.mdx b/fern/03-reference/baml/types.mdx index c94edc7dd..6d97f1893 100644 --- a/fern/03-reference/baml/types.mdx +++ b/fern/03-reference/baml/types.mdx @@ -319,12 +319,28 @@ A collection of elements of the same type. ### Map -A mapping of strings to elements of another type. +A mapping of strings or enums to elements of another type. **Syntax**: `map` **Example**: `map` +Enums and literal strings can also be used as keys. + +```baml +enum Category { + A + B + C +} + +// Enum key syntax +map + +// Literal strings syntax +map<"A" | "B" | "C", string> +``` + {/* For TS users: `map` will generate a `Record` type annotation, but using any other type for the