Skip to main content
Glama
string-interpolation-textexpr.md632 B
## String Interpolation: `"text @{expr}"` Interpolation works automatically inside string literals - no `format!()` needed: Rust ``` let name = "World"; let count = 42; let code = ts_template! {     console.log("Hello @{name}!");     console.log("Count: @{count}, doubled: @{count * 2}"); }; ``` **Generates:** TypeScript ``` console.log("Hello World!"); console.log("Count: 42, doubled: 84"); ``` This also works with method calls and complex expressions: Rust ``` let field = "username"; let code = ts_template! {     throw new Error("Invalid @{field.to_uppercase()}"); }; ```

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/macroforge-ts/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server