Tygo for go->typescript type generation
This commit is contained in:
parent
3c87fd4d8c
commit
151d6de39b
3 changed files with 14 additions and 1 deletions
|
@ -118,3 +118,7 @@ uml: plantuml.jar
|
|||
install-just:
|
||||
@echo "Installing just"
|
||||
@curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
|
||||
|
||||
.PHONY: types
|
||||
types:
|
||||
tygo generate
|
9
backend/tygo.yaml
Normal file
9
backend/tygo.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
packages:
|
||||
- path: "ttime/internal/types"
|
||||
output_path: "../frontend/src/Types/goTypes.ts"
|
||||
type_mappings:
|
||||
time.Time: "string /* RFC3339 */"
|
||||
null.String: "null | string"
|
||||
null.Bool: "null | boolean"
|
||||
uuid.UUID: "string /* uuid */"
|
||||
uuid.NullUUID: "null | string /* uuid */"
|
Loading…
Add table
Add a link
Reference in a new issue