Files
zeekay c608ad75df module: hanzo.ai/tygoja
The import path is the site, not the host holding the code. The repo moved to the
hanzo-go org in the same change; the path deliberately did not move with it,
which is the whole point of a vanity path — a consumer pins hanzo.ai/tygoja and
never learns which org the git repo sits in.

hanzo.ai/lib/go-modules.ts serves the go-import tag for it and now resolves the
repo to hanzo-go rather than following GitHub's redirect.
2026-08-27 12:35:52 -07:00

34 lines
682 B
Go

package main
import (
"log"
"os"
"hanzo.ai/tygoja"
)
func main() {
gen := tygoja.New(tygoja.Config{
Packages: map[string][]string{
"hanzo.ai/tygoja/test/a": {"*"},
"hanzo.ai/tygoja/test/b": {"*"},
"hanzo.ai/tygoja/test/c": {"Example2", "Handler"},
},
Heading: `declare var $app: c.Handler;`,
WithPackageFunctions: true,
// enable if you want to be able to import them
// StartModifier: "export",
})
result, err := gen.Generate()
if err != nil {
log.Fatal(err)
}
if err := os.WriteFile("./types.d.ts", []byte(result), 0644); err != nil {
log.Fatal(err)
}
// run `npx typedoc` to generate HTML docs from the above declarations
}