comments

Single line / trailing comments

Denoted by //.

// hello there!
foo // this is a trailing comment

Docstrings

To add a docstring to any block, use ///.

/// This is a docstring for a class
class Foo {
/// This is a docstring for a property
property1 string
}

Docstrings in BAML code will be carried through to generated types. They are not forwarded to the LLM through prompts.

Comments in block strings

See Block Strings for more information.

#"
My string. {#
This is a comment
#}
hi!
"#