Adding upstream version 0.0~git20250307.c2e6a77.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
be99035e76
commit
b6e042e2af
64 changed files with 10976 additions and 0 deletions
33
test/main.go
Normal file
33
test/main.go
Normal file
|
@ -0,0 +1,33 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/pocketbase/tygoja"
|
||||
)
|
||||
|
||||
func main() {
|
||||
gen := tygoja.New(tygoja.Config{
|
||||
Packages: map[string][]string{
|
||||
"github.com/pocketbase/tygoja/test/a": {"*"},
|
||||
"github.com/pocketbase/tygoja/test/b": {"*"},
|
||||
"github.com/pocketbase/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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue