apitypings
command v0.27.3
Go to latest Published: Aug 1, 2023 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:18 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
APITypings
This main.go generates typescript types from the codersdk types in Go.
Features
- Supports Go types
- Basics (string/int/etc)
- Maps
- Slices
- Enums
- Pointers
- External Types (uses
any
atm)- Some custom external types are hardcoded in (eg: time.Time)
Type overrides
type Foo struct {// Force the typescript type to be a numberCreatedAt time.Duration `json:"created_at" typescript:"number"`}
Ignore Types
Do not generate ignored types.
// @typescript-ignore InternalTypetype InternalType struct {// ...}
Future Ideas
- Use a yaml config for overriding certain types
Documentation¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.