Skip to content

Commit

Permalink
found a place it mattered, pushing the star replacement to the genera…
Browse files Browse the repository at this point in the history
…te side
  • Loading branch information
pbnjay committed Jan 2, 2025
1 parent 2d7ffaa commit 9e26774
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions v2/internal/binding/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ var (

func goTypeToTypescriptType(input string, importNamespaces *slicer.StringSlicer) string {
tname := goTypeToJSDocType(input, importNamespaces)
tname = strings.ReplaceAll(tname, "*", "")
gidx := strings.IndexRune(tname, '[')
if gidx > 0 { // its a generic type
rem := strings.SplitN(tname, "[", 2)
Expand Down
2 changes: 1 addition & 1 deletion v2/internal/binding/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func getPackageName(in string) string {
}

func getSplitReturn(in string) (string, string) {
result := strings.Split(in, ".")
result := strings.SplitN(in, ".", 2)
return result[0], result[1]
}

Expand Down
2 changes: 1 addition & 1 deletion v2/internal/typescriptify/typescriptify.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ func indentLines(str string, i int) string {

func getStructFQN(in string) string {
result := strings.ReplaceAll(in, "[]", "")
//result = strings.ReplaceAll(result, "*", "")
result = strings.ReplaceAll(result, "*", "")
return result
}

Expand Down

0 comments on commit 9e26774

Please sign in to comment.