Documentation ¶ Index ¶ func Parse(inputFile string, pkgName *string, types *[]*ast.TypeSpec) (err error) type Generator func New(ctx *common.Context) *Generator func (g *Generator) Generate() (err error) func (g *Generator) Tests() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Parse ¶ func Parse(inputFile string, pkgName *string, types *[]*ast.TypeSpec) (err error) Parse reads a JS file and extracts class definitions as Go AST TypeSpecs. It relies on the constructor initializing fields to infer types. It prioritizes trailing comments for type definition (e.g., // map[string]int). Types ¶ type Generator ¶ type Generator struct { *common.Context // contains filtered or unexported fields } func New ¶ func New(ctx *common.Context) *Generator func (*Generator) Generate ¶ func (g *Generator) Generate() (err error) func (*Generator) Tests ¶ func (g *Generator) Tests() Source Files ¶ View all Source files javascript.goparser.go Click to show internal directories. Click to hide internal directories.