Initial bindings.js generation

This commit is contained in:
Lea Anthony
2023-03-03 19:54:12 +11:00
parent 868b769e7f
commit 71aa7c9731
3 changed files with 123 additions and 71 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func (p *Parameter) JSType() string {
// Convert type to javascript equivalent type
var typeName string
switch p.Type.Name {
case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr":
case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64":
typeName = "number"
case "string":
typeName = "string"