To set up BAML with Typescript do the following:
https://marketplace.visualstudio.com/items?itemName=boundary.baml-extension
This will give you some starter BAML code in a baml_src directory.
baml_client typescript package from .baml filesOne of the files in your baml_src directory will have a generator block. This tells BAML how to generate the baml_client directory, which will have auto-generated typescript code to call your BAML functions.
If you need baml_client to be ‘ESM’ compatible, you can add the following generator configuration to your .baml file:
You can modify your package.json so you have a helper prefix in front of your build command.
See What is baml_src to learn more about how this works.

If you set up the VSCode extension, it will automatically run baml-cli generate on saving a BAML file.