more updates
This commit is contained in:
@@ -58,6 +58,15 @@ Two types of functions:
|
||||
- Use JSON tags for TypeScript type definitions
|
||||
- Async functions automatically generate `Promise<R>` return types
|
||||
|
||||
### Calling Convention
|
||||
|
||||
**Important**: Functions have different calling conventions on Go vs JavaScript sides:
|
||||
|
||||
- **Go side**: Function receives a **single argument struct** with all parameters
|
||||
- **JavaScript side**: Function is called with **individual arguments** matching the struct fields (in field order)
|
||||
|
||||
Fields are ordered by their position in the struct, with the generated TypeScript signature using those field names as argument names.
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
|
||||
Reference in New Issue
Block a user