5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 03:52:41 +08:00

added interface{} test case and fixed

This commit is contained in:
Albert Sun 2022-01-22 10:23:02 -05:00
parent 4118f348f5
commit f5c3907fac
2 changed files with 7 additions and 0 deletions

View File

@ -201,6 +201,8 @@ declare global {
func goTypeToJSDocType(input string) string {
switch true {
case input == "interface{}":
return "any"
case input == "string":
return "string"
case input == "error":

View File

@ -56,6 +56,11 @@ func Test_goTypeToJSDocType(t *testing.T) {
input: "bool",
want: "boolean",
},
{
name: "interface{}",
input: "interface{}",
want: "any",
},
{
name: "[]byte",
input: "[]byte",