typescript

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassDeclaration

type ClassDeclaration struct {
	Node
	Modifiers []*Node        `json:"modifiers,omitempty"`
	Name      *Node          `json:"name"`
	Members   []*ClassMember `json:"members"`
}

type ClassMember

type ClassMember struct {
	Node
	Initializer *Initializer `json:"initializer"`
	Modifiers   []*Node      `json:"modifiers,omitempty"`
	Name        *Node        `json:"name"`
}

type ImportClause

type ImportClause struct {
	Node
	NamedBindings *NamedBindings `json:"namedBindings"`
	IsTypeOnly    bool           `json:"isTypeOnly"`
	Name          *Node          `json:"name,omitempty"`
}

type ImportDeclaration

type ImportDeclaration struct {
	Node
	ImportClause    *ImportClause    `json:"importClause"`
	ModuleSpecifier *ModuleSpecifier `json:"moduleSpecifier"`
}

type Initializer

type Initializer struct {
	Node
	HasExtendedUnicodeEscape bool `json:"hasExtendedUnicodeEscape"`
}

type InterfaceDeclaration

type InterfaceDeclaration struct {
	Name Node `json:"name"`
	Node
	Members []*InterfaceMember `json:"members"`
}

func (*InterfaceDeclaration) InterfaceName

func (i *InterfaceDeclaration) InterfaceName() string

type InterfaceMember

type InterfaceMember struct {
	Node
	Name          *Node                `json:"name"`
	QuestionToken *Node                `json:"questionToken,omitempty"`
	Type          *InterfaceMemberType `json:"type"`
	JsDoc         []*JsDoc             `json:"jsDoc"`
	Parameters    []*Parameter         `json:"parameters"`
}

func (*InterfaceMember) MemberName

func (m *InterfaceMember) MemberName() string

type InterfaceMemberType

type InterfaceMemberType struct {
	Node
	TypeName *TypeName              `json:"typeName,omitempty"`
	Types    []*InterfaceMemberType `json:"types,omitempty"`
	Type     *InterfaceMemberType   `json:"type,omitempty"`
	Literal  *Node                  `json:"literal,omitempty"`
	Members  []*InterfaceMember     `json:"members"`
}

func (*InterfaceMemberType) KindString

func (mt *InterfaceMemberType) KindString() string

func (*InterfaceMemberType) TypeLiteral

func (mt *InterfaceMemberType) TypeLiteral() string

type JsDoc

type JsDoc struct {
	Node
	Comment string      `json:"comment"`
	Parent  interface{} `json:"parent,omitempty"`
}

type Kind

type Kind int

func (Kind) ToType

func (k Kind) ToType() string

type ModuleSpecifier

type ModuleSpecifier struct {
	Node
	HasExtendedUnicodeEscape bool `json:"hasExtendedUnicodeEscape"`
}

type NamedBindings

type NamedBindings struct {
	Node
	Name *Node `json:"name"`
}

type Node

type Node struct {
	Pos                int    `json:"pos"`
	End                int    `json:"end"`
	Kind               Kind   `json:"kind"`
	ModifierFlagsCache int    `json:"modifierFlagsCache,omitempty"`
	TransformFlags     int    `json:"transformFlags,omitempty"`
	EscapedText        string `json:"escapedText,omitempty"`
	Flags              int    `json:"flags,omitempty"`
	Text               string `json:"text,omitempty"`
}

func (*Node) LowerText

func (n *Node) LowerText() string

func (*Node) UpperText

func (n *Node) UpperText() string

type Parameter

type Parameter struct {
	Node
	Name *Node `json:"name"`
	Type *Node `json:"type"`
}

func (*Parameter) Definition

func (p *Parameter) Definition() string

type SourceFile

type SourceFile struct {
	Imports        []*ImportDeclaration
	Interfaces     []*InterfaceDeclaration
	Classes        []*ClassDeclaration
	TypeAliases    []*TypeAliasDeclaration
	Statements     []interface{} `json:"statements"`
	EndOfFileToken *Node         `json:"endOfFileToken"`
	FileName       string        `json:"fileName"`
	Text           string        `json:"text"`
}

func (*SourceFile) Dump

func (s *SourceFile) Dump()

func (*SourceFile) ParseStatements

func (s *SourceFile) ParseStatements()

type TypeAliasDeclaration

type TypeAliasDeclaration struct {
	Node
	Modifiers []*Node        `json:"modifiers,omitempty"`
	Name      *Node          `json:"name"`
	Type      *TypeAliasType `json:"type"`
}

func (*TypeAliasDeclaration) AliasValue

func (d *TypeAliasDeclaration) AliasValue() string

type TypeAliasParameter

type TypeAliasParameter struct {
	Node
	Name *Node                   `json:"name"`
	Type *TypeAliasParameterType `json:"type"`
}

type TypeAliasParameterArguments

type TypeAliasParameterArguments struct {
	Node
	TypeName *TypeName `json:"typeName"`
}

type TypeAliasParameterType

type TypeAliasParameterType struct {
	Node
	TypeArguments []*TypeAliasParameterArguments `json:"typeArguments"`
	TypeName      *TypeName                      `json:"typeName"`
	Types         []*Node                        `json:"types"`
}

type TypeAliasType

type TypeAliasType struct {
	Node
	Type       *Node                   `json:"types"`
	Types      []*TypeAliasTypeLiteral `json:"types"`
	Parameters []*TypeAliasParameter   `json:"parameters"`
}

type TypeAliasTypeLiteral

type TypeAliasTypeLiteral struct {
	Node
	Literal *Node `json:"literal"`
}

type TypeName

type TypeName struct {
	Node
	Left  *Node `json:"left"`
	Right *Node `json:"right"`
}

func (*TypeName) TypeName

func (n *TypeName) TypeName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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