feat: Switch packages for typescript generation code (#1196)

* feat: Switch packages for typescript generation code

Supports a larger set of types
  - [x] Basics (string/int/etc) 
  - [x] Maps
  - [x] Slices
  - [x] Enums
  - [x] Pointers
This commit is contained in:
Steven Masley
2022-04-28 11:59:14 -05:00
committed by GitHub
parent afc43fe95f
commit e330dc1321
6 changed files with 720 additions and 315 deletions

View File

@ -26,6 +26,7 @@ func New(serverURL *url.URL) *Client {
}
// Client is an HTTP caller for methods to the Coder API.
// @typescript-ignore Client
type Client struct {
HTTPClient *http.Client
SessionToken string
@ -113,6 +114,7 @@ func readBodyAsError(res *http.Response) error {
}
// Error represents an unaccepted or invalid request to the API.
// @typescript-ignore Error
type Error struct {
httpapi.Response