Skip to content

Commit

Permalink
be more specific about int and double for Dart and Swift types
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 15, 2024
1 parent 7737306 commit d66dd63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d66dd63

Please sign in to comment.