declaration

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package declaration defines compiler-owned type information supplied by runtime-library providers. It is deliberately independent of syntax ASTs: RBS, .d.ts, Go export data, and dynamic framework indexers can all target the same representation without making application authors maintain shadow declaration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Types   map[string]*Type
	Modules map[string]*Module
}

func NewCatalog

func NewCatalog() *Catalog

func (*Catalog) Member

func (c *Catalog) Member(typeName, name string, class bool) (Member, bool)

func (*Catalog) Merge

func (c *Catalog) Merge(other *Catalog)

func (*Catalog) Module

func (c *Catalog) Module(name string) (*Module, bool)

func (*Catalog) Type

func (c *Catalog) Type(name string) (*Type, bool)

type Member

type Member struct {
	Name           string
	Kind           MemberKind
	Parameters     []Parameter
	Return         types.Type
	Variadic       bool
	Class          bool
	TypeParameters []string
	Provider       string
}

type MemberKind

type MemberKind string
const (
	Method   MemberKind = "method"
	Property MemberKind = "property"
)

type Module

type Module struct {
	Name            string
	InstanceMembers map[string]Member
}

func NewModule

func NewModule(name string) *Module

type Parameter

type Parameter struct {
	Name     string
	Type     types.Type
	Keyword  bool
	Optional bool
}

type Type

type Type struct {
	Name            string
	Superclass      string
	InstanceMembers map[string]Member
	ClassMembers    map[string]Member
}

func NewType

func NewType(name, superclass string) *Type

Jump to

Keyboard shortcuts

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