create_statement_with_code
Create a statement with code in one call, inferring TypeScript types from code structure. Use instead of separate create and add steps.
Instructions
Create a statement with code in one call. Preferred over two-step create_statement + add_statement_code.
Pass 'types' to specify TypeScript types for variables. The assembler infers the full type from code structure:
ref([])+ type "Todo" → outputsconst todos: Ref<Todo[]>ref(0)+ type "number" → outputsconst count: Ref<number>reactive({})+ type "State" → outputsconst state: State
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | UUID of the file to add the statement to | |
| code | Yes | The code for the statement (e.g., "const count = ref(0);") | |
| method | No | UUID of the method to add the statement to (optional, for method body statements) | |
| types | No | Map of variable names to their base TypeScript types (e.g., { "todos": "Todo", "count": "number" }). The assembler infers Ref<>, arrays, etc. from the code structure. |