Skip to content

chore: support external types in typescript codegen #9633

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 11 commits into from
Sep 12, 2023
Prev Previous commit
Next Next commit
Add regexp
  • Loading branch information
Emyrk committed Sep 11, 2023
commit ad74acbdb8eb6e0593c107a9a405c29cd1305bf9
2 changes: 2 additions & 0 deletions scripts/apitypings/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
// We would need to add more logic to determine this, but for now
// just hard code them.
switch n.String() {
case "github.com/coder/coder/v2/cli/clibase.Regexp":
return TypescriptType{ValueType: "string"}, nil
case "github.com/coder/coder/v2/cli/clibase.HostPort":
// Custom marshal json to be a string
return TypescriptType{ValueType: "string"}, nil
Expand Down