From d66dd6368f4f94dea222014e22f9ada3ec0563c1 Mon Sep 17 00:00:00 2001 From: Mat Ryer Date: Fri, 15 Mar 2024 11:30:06 +0000 Subject: [PATCH] be more specific about int and double for Dart and Swift types --- parser/parser.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/parser/parser.go b/parser/parser.go index e983da9..f861df5 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -485,8 +485,12 @@ func (p *Parser) parseFieldType(pkg *packages.Package, obj types.Object) (FieldT ftype.TSType = "boolean" ftype.DartType = "bool" case "int", "int16", "int32", "int64", - "uint", "uint16", "uint32", "uint64", - "float32", "float64": + "uint", "uint16", "uint32", "uint64": + ftype.JSType = "number" + ftype.TSType = "number" + ftype.SwiftType = "Int" + ftype.DartType = "int" + case "float32", "float64": ftype.JSType = "number" ftype.SwiftType = "Double" ftype.TSType = "number"