Single line / trailing comments

Denoted by //.

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

Docstrings

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

1/// This is a docstring for a class
2class Foo {
3 /// This is a docstring for a property
4 property1 string
5}

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.

1#"
2 My string. {#
3 This is a comment
4 #}
5 hi!
6"#