compile

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Name        string
	Description string
	Methods     []*Method
}

type Method

type Method struct {
	Name        string
	Description string
	Source      *types.Func
	Args        []Param
	Result      *Type // may be nil
}

func (*Method) ArgNames

func (m *Method) ArgNames() []string

type Param

type Param struct {
	Name     string
	Source   *types.Var
	Optional bool
	TS       TSVar
}

type TSVar

type TSVar struct {
	Type     string
	Nillable bool
	Items    *TSVar
	Key      *TSVar
}

func (TSVar) Render

func (ts TSVar) Render() string

type Type

type Type struct {
	Source types.Type
	TS     TSVar
}

type TypeLookup

type TypeLookup struct {
	// contains filtered or unexported fields
}

func New

func New() *TypeLookup

func (*TypeLookup) Aliases

func (tl *TypeLookup) Aliases() map[string]Type

func (*TypeLookup) CastToTypesScript

func (tl *TypeLookup) CastToTypesScript(src types.Type) TSVar

func (*TypeLookup) CommentLookup

func (tl *TypeLookup) CommentLookup(handler func(pos token.Pos) string)

func (*TypeLookup) Custom added in v1.3.2

func (tl *TypeLookup) Custom(srcType string, ts TSVar)

func (*TypeLookup) Objects

func (tl *TypeLookup) Objects() map[string][]Param

func (*TypeLookup) RegisterType

func (tl *TypeLookup) RegisterType(obj *types.Named) string

func (*TypeLookup) ScanAPI

func (tl *TypeLookup) ScanAPI(obj *types.Named) API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL