Skip to content

feat: Switch packages for typescript generation code #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
Emyrk committed Apr 28, 2022
commit 710b4271fe8163715c0cdd98d57ff5775caec2dc
3 changes: 1 addition & 2 deletions scripts/apitypings/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,12 @@ func (g *Generator) typescriptType(obj types.Object, ty types.Type) (string, str
return name, "", nil
}

// These are special types that we handle uniquely.
switch n.String() {
case "net/url.URL":
return "string", "", nil
case "time.Time":
return "string", "is this ok for time?", nil
case "github.com/coder/coder/coderd/httpapi.Response":

}

// If it's a struct, just use the name of the struct type
Expand Down