(def: D)
| 791 | type AnyToolDef = ToolDef<any, any, any> |
| 792 | |
| 793 | export function buildTool<D extends AnyToolDef>(def: D): BuiltTool<D> { |
| 794 | // The runtime spread is straightforward; the `as` bridges the gap between |
| 795 | // the structural-any constraint and the precise BuiltTool<D> return. The |
| 796 | // type semantics are proven by the 0-error typecheck across all 60+ tools. |
| 797 | return { |
| 798 | ...TOOL_DEFAULTS, |
| 799 | userFacingName: () => def.name, |
| 800 | ...def, |
| 801 | } as BuiltTool<D> |
| 802 | } |
no outgoing calls
no test coverage detected