Credits to Tygo PKG
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)
}