package
0.0.0-20240104213556-8d3c2691da6e
Repository: https://github.com/piterweb/alf-router.git
Documentation: pkg.go.dev
# README
Plugin 🧩 TS
Export your golang types to TS for your frontend
Credits to Tygo PKG
Usage :
Import it to your code ðŸ”
import (
tspl "github.com/PiterWeb/Alf-Router/plugins/ts"
)
Use it on your start point and change Packages with the names of the modules where are the types you want. For default all public types on the default module will be already included
err := alf.App(&alf.AppConfig{
Port: "3000",
Routes: alf.CreateRouter([]alf.Route{
{
...
},
}),
Plugins: []alf.Plugin{
tspl.TS_plugin{
Packages: []string{
"github.com/exampleUser/myProject/submodule",
},
OutputFolder: "./ts-types",
},
},
})
if err != nil {
panic(err)
}