@macroforge/mcp-server
Version:
MCP server for Macroforge documentation and code analysis
27 lines (19 loc) • 894 B
Markdown
## Type-Position Macros
One built-in macro is written where a type goes rather than in ``:
| Macro | Expands To | Description |
| ----------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- |
| [`$Newtype<T>`](../docs/builtin-macros/newtype) | `T & { readonly [brand]: true }` | Nominal brand backed by a per-site `unique symbol` |
## Using Built-in Macros
Built-in macros don't require imports. Just use them with ``:
TypeScript
```
/** @derive(Debug, Clone, PartialEq) */
class User {
name: string;
age: number;
constructor(name: string, age: number) {
this.name = name;
this.age = age;
}
}
```