Versions in this module Expand all Collapse all v0 v0.2.3 Sep 3, 2026 v0.2.2 Aug 29, 2026 v0.2.1 Aug 25, 2026 v0.2.0 Aug 21, 2026 v0.1.0 Aug 20, 2026 Changes in this version + func ChildSeq(n Node) iter.Seq[Node] + func Collect[T Node](seq iter.Seq[T]) []T + func Filter[T Node](seq iter.Seq[T], pred func(T) bool) iter.Seq[T] + func Inspect(n Node, f func(Node) bool) + func OfType[T Node](root Node) iter.Seq[T] + func Postorder(root Node) iter.Seq[Node] + func Preorder(root Node) iter.Seq[Node] + func Walk(v Visitor, n Node) + func WithParent(root Node) iter.Seq2[Node, Node] + type ArrayLit struct + Elems []Expr + func (*ArrayLit) Kind() Kind + type ArrayType struct + Elem Type + func Array(elem Type) *ArrayType + func (*ArrayType) Kind() Kind + type ArrowFunc struct + Async bool + Body *BlockStmt + Expr Expr + func (*ArrowFunc) Kind() Kind + type AsExpr struct + Const bool + Expr Expr + Type Type + func (*AsExpr) Kind() Kind + type Base struct + Loc token.Span + func (b *Base) SetSpan(s token.Span) + func (b *Base) Span() token.Span + type BigIntLit struct + Text string + func (*BigIntLit) Kind() Kind + type BinaryExpr struct + Left Expr + Op string + Right Expr + func (*BinaryExpr) Kind() Kind + type Binding struct + Definite bool + Name PropertyName + Type Type + Value Expr + func (*Binding) Kind() Kind + type BlockStmt struct + Stmts []Stmt + func (*BlockStmt) Kind() Kind + type BoolLit struct + Value bool + func Bool(v bool) *BoolLit + func (*BoolLit) Kind() Kind + type CallExpr struct + Args []Expr + Callee Expr + Optional bool + TypeArgs []Type + func Call(callee Expr, args ...Expr) *CallExpr + func (*CallExpr) Kind() Kind + type CallSignature struct + Docs *Doc + func (*CallSignature) Kind() Kind + type ClassDecl struct + Docs *Doc + Extends *Heritage + Implements []*Heritage + Members []Member + Mods Modifier + Name *Ident + TypeParams []*TypeParam + func (*ClassDecl) Kind() Kind + type ComputedName struct + Expr Expr + func (*ComputedName) Kind() Kind + type CondExpr struct + Cond Expr + Else Expr + Then Expr + func (*CondExpr) Kind() Kind + type ConditionalType struct + Check Type + Extends Type + False Type + True Type + func (*ConditionalType) Kind() Kind + type ConstructSignature struct + Docs *Doc + func (*ConstructSignature) Kind() Kind + type ConstructorType struct + Abstract bool + func (*ConstructorType) Kind() Kind + type Decl interface + type Doc struct + Tags []DocTag + Text []string + func Comment(lines ...string) *Doc + func (d *Doc) IsEmpty() bool + type DocTag struct + Name string + Text string + type EntityName interface + type EnumDecl struct + Docs *Doc + Members []*EnumMember + Mods Modifier + Name *Ident + func (*EnumDecl) Kind() Kind + type EnumMember struct + Docs *Doc + Name PropertyName + Value Expr + func (*EnumMember) Kind() Kind + type ExportAssign struct + Default bool + Docs *Doc + Expr Expr + func (*ExportAssign) Kind() Kind + type ExportDecl struct + Attributes []ImportAttribute + Decl Decl + Docs *Doc + Module string + Named []ImportSpec + Star bool + StarAs string + TypeOnly bool + func (*ExportDecl) Kind() Kind + type Expr interface + type ExprStmt struct + Expr Expr + func (*ExprStmt) Kind() Kind + type FunctionDecl struct + Body *BlockStmt + Docs *Doc + Generator bool + Mods Modifier + Name *Ident + func (*FunctionDecl) Kind() Kind + type FunctionType struct + Abstract bool + func (*FunctionType) Kind() Kind + type GetAccessor struct + Body *BlockStmt + Docs *Doc + Mods Modifier + Name PropertyName + func (*GetAccessor) Kind() Kind + type Heritage struct + Args []Type + Name EntityName + func Extends(name string, args ...Type) *Heritage + func (*Heritage) Kind() Kind + type Ident struct + Text string + func NewIdent(text string) *Ident + func (*Ident) Kind() Kind + type ImportAttribute struct + Key string + Value string + type ImportDecl struct + Attributes []ImportAttribute + Default string + Docs *Doc + Module string + Named []ImportSpec + Namespace string + TypeOnly bool + func (*ImportDecl) Kind() Kind + type ImportSpec struct + Alias string + Name string + TypeOnly bool + type ImportType struct + Args []Type + Attributes []ImportAttribute + Module string + Qualifier EntityName + TypeOf bool + func (*ImportType) Kind() Kind + type IndexExpr struct + Index Expr + Object Expr + Optional bool + func (*IndexExpr) Kind() Kind + type IndexSignature struct + Docs *Doc + KeyName string + KeyType Type + Readonly bool + Static bool + Type Type + func (*IndexSignature) Kind() Kind + type IndexedAccessType struct + Index Type + Object Type + func Index(obj, idx Type) *IndexedAccessType + func (*IndexedAccessType) Kind() Kind + type InferType struct + Param *TypeParam + func (*InferType) Kind() Kind + type InterfaceDecl struct + Docs *Doc + Extends []*Heritage + Members []Member + Mods Modifier + Name *Ident + TypeParams []*TypeParam + func (*InterfaceDecl) Kind() Kind + type IntersectionType struct + Types []Type + func (*IntersectionType) Kind() Kind + type KeywordKind uint8 + const KwAny + const KwBigInt + const KwBoolean + const KwNever + const KwNull + const KwNumber + const KwObject + const KwString + const KwSymbol + const KwUndefined + const KwUnknown + const KwVoid + func (k KeywordKind) String() string + type KeywordType struct + Keyword KeywordKind + func (*KeywordType) Kind() Kind + type Kind uint16 + const KindArrayLit + const KindArrayType + const KindArrowFunc + const KindAsExpr + const KindBigIntLit + const KindBinaryExpr + const KindBinding + const KindBlockStmt + const KindBoolLit + const KindCallExpr + const KindCallSignature + const KindClassDecl + const KindComputedName + const KindCondExpr + const KindConditionalType + const KindConstructSignature + const KindConstructorType + const KindEnumDecl + const KindEnumMember + const KindExportAssign + const KindExportDecl + const KindExprStmt + const KindFunctionDecl + const KindFunctionType + const KindGetAccessor + const KindHeritage + const KindIdent + const KindImportDecl + const KindImportType + const KindIndexExpr + const KindIndexSignature + const KindIndexedAccessType + const KindInferType + const KindInterfaceDecl + const KindIntersectionType + const KindInvalid + const KindKeywordType + const KindLiteralType + const KindMappedType + const KindMemberExpr + const KindMethodDecl + const KindMethodSignature + const KindModuleDecl + const KindNamedTupleMember + const KindNewExpr + const KindNonNullExpr + const KindNullLit + const KindNumberLit + const KindObjectLit + const KindOptionalType + const KindParam + const KindParenType + const KindPredicateType + const KindPropertyDecl + const KindPropertySignature + const KindQualifiedName + const KindRawExpr + const KindRawStmt + const KindRawType + const KindRestType + const KindReturnStmt + const KindSatisfiesExpr + const KindSetAccessor + const KindSourceFile + const KindSpreadExpr + const KindStringLit + const KindTemplateLit + const KindTemplateLiteralType + const KindThisType + const KindTupleType + const KindTypeAliasDecl + const KindTypeLiteral + const KindTypeOperator + const KindTypeParam + const KindTypeQuery + const KindTypeRef + const KindUnaryExpr + const KindUndefinedLit + const KindUnionType + const KindVarDecl + type LiteralKind uint8 + const LitBigInt + const LitBoolean + const LitNumber + const LitString + type LiteralType struct + LitKind LiteralKind + Negated bool + Value string + func BoolLiteral(v bool) *LiteralType + func NumberLiteral(v string) *LiteralType + func StringLiteral(v string) *LiteralType + func (*LiteralType) Kind() Kind + type MappedModifier int8 + const MappedAdd + const MappedRemove + const MappedUnset + type MappedType struct + As Type + OptionalMod MappedModifier + Param *TypeParam + ReadonlyMod MappedModifier + Type Type + func (*MappedType) Kind() Kind + type Member interface + type MemberExpr struct + Object Expr + Optional bool + Prop *Ident + func Dot(obj Expr, prop string) *MemberExpr + func (*MemberExpr) Kind() Kind + type MethodDecl struct + Body *BlockStmt + Docs *Doc + Mods Modifier + Name PropertyName + Optional bool + func (*MethodDecl) Kind() Kind + type MethodSignature struct + Docs *Doc + Name PropertyName + Optional bool + func (*MethodSignature) Kind() Kind + type Modifier uint32 + const ModAbstract + const ModAccessor + const ModAsync + const ModConst + const ModDeclare + const ModDefault + const ModExport + const ModOverride + const ModPrivate + const ModProtected + const ModPublic + const ModReadonly + const ModStatic + func (mo Modifier) Has(m Modifier) bool + func (mo Modifier) With(m Modifier) Modifier + func (mo Modifier) Without(m Modifier) Modifier + type ModuleDecl struct + Body []Stmt + Docs *Doc + Mods Modifier + ModuleKind ModuleKind + Name string + func (*ModuleDecl) Kind() Kind + type ModuleKind uint8 + const ModuleAmbient + const ModuleGlobal + const ModuleNamespace + type NamedTupleMember struct + Name *Ident + Optional bool + Rest bool + Type Type + func (*NamedTupleMember) Kind() Kind + type NewExpr struct + Args []Expr + Callee Expr + TypeArgs []Type + func (*NewExpr) Kind() Kind + type Node interface + Kind func() Kind + Span func() token.Span + func Children(n Node) []Node + func Find(n Node, pred func(Node) bool) Node + type NonNullExpr struct + Expr Expr + func (*NonNullExpr) Kind() Kind + type NullLit struct + func (*NullLit) Kind() Kind + type NumberLit struct + Text string + func Num(text string) *NumberLit + func (*NumberLit) Kind() Kind + type ObjectLit struct + Props []ObjectProp + func (*ObjectLit) Kind() Kind + type ObjectProp struct + Docs *Doc + Name PropertyName + Shorthand bool + Spread bool + Value Expr + type OptionalType struct + Elem Type + func (*OptionalType) Kind() Kind + type Param struct + Default Expr + Docs *Doc + Mods Modifier + Name PropertyName + Optional bool + Rest bool + Type Type + func (*Param) Kind() Kind + type ParenType struct + Inner Type + func (*ParenType) Kind() Kind + type Positioner interface + SetSpan func(token.Span) + type PredicateType struct + Asserts bool + ParamName *Ident + Type Type + func (*PredicateType) Kind() Kind + type PropertyDecl struct + Definite bool + Docs *Doc + Mods Modifier + Name PropertyName + Optional bool + Type Type + Value Expr + func (*PropertyDecl) Kind() Kind + type PropertyName interface + type PropertySignature struct + Docs *Doc + Name PropertyName + Optional bool + Readonly bool + Type Type + func Prop(name string, t Type) *PropertySignature + func (*PropertySignature) Kind() Kind + type QualifiedName struct + Left EntityName + Right *Ident + func (*QualifiedName) Kind() Kind + type RawExpr struct + Text string + func (*RawExpr) Kind() Kind + type RawStmt struct + Text string + func (*RawStmt) Kind() Kind + type RawType struct + Text string + func Raw(text string) *RawType + func (*RawType) Kind() Kind + type RestType struct + Elem Type + func (*RestType) Kind() Kind + type ReturnStmt struct + Value Expr + func (*ReturnStmt) Kind() Kind + type SatisfiesExpr struct + Expr Expr + Type Type + func (*SatisfiesExpr) Kind() Kind + type ScriptKind uint8 + const ScriptDTS + const ScriptJS + const ScriptJSX + const ScriptTS + const ScriptTSX + type SetAccessor struct + Body *BlockStmt + Docs *Doc + Mods Modifier + Name PropertyName + func (*SetAccessor) Kind() Kind + type Signature struct + Params []*Param + Return Type + TypeParams []*TypeParam + type SourceFile struct + Leading []string + Name string + ScriptKind ScriptKind + Stmts []Stmt + func (*SourceFile) Kind() Kind + func (f *SourceFile) Add(stmts ...Stmt) *SourceFile + type SpreadExpr struct + Expr Expr + func (*SpreadExpr) Kind() Kind + type Stmt interface + type StringLit struct + Value string + func Str(v string) *StringLit + func (*StringLit) Kind() Kind + type TemplateLit struct + Exprs []Expr + Quasis []string + Tag Expr + func (*TemplateLit) Kind() Kind + type TemplateLiteralType struct + Quasis []string + Types []Type + func (*TemplateLiteralType) Kind() Kind + type ThisType struct + func (*ThisType) Kind() Kind + type TupleType struct + Elems []Type + func (*TupleType) Kind() Kind + type Type interface + var Any Type = &KeywordType{ ... } + var BigInt Type = &KeywordType{ ... } + var Boolean Type = &KeywordType{ ... } + var Never Type = &KeywordType{ ... } + var Null Type = &KeywordType{ ... } + var Number Type = &KeywordType{ ... } + var Object Type = &KeywordType{ ... } + var String Type = &KeywordType{ ... } + var Symbol Type = &KeywordType{ ... } + var Undefined Type = &KeywordType{ ... } + var Unknown Type = &KeywordType{ ... } + var Void Type = &KeywordType{ ... } + func Intersection(types ...Type) Type + func Nullable(t Type) Type + func Optional(t Type) Type + func StringUnion(values ...string) Type + func Union(types ...Type) Type + type TypeAliasDecl struct + Docs *Doc + Mods Modifier + Name *Ident + Type Type + TypeParams []*TypeParam + func (*TypeAliasDecl) Kind() Kind + type TypeLiteral struct + Members []Member + func (*TypeLiteral) Kind() Kind + type TypeOperator struct + Op TypeOperatorKind + Type Type + func KeyOf(t Type) *TypeOperator + func (*TypeOperator) Kind() Kind + type TypeOperatorKind uint8 + const OpKeyOf + const OpReadonly + const OpUnique + func (o TypeOperatorKind) String() string + type TypeParam struct + Const bool + Constraint Type + Default Type + Docs *Doc + Name *Ident + Variance Variance + func (*TypeParam) Kind() Kind + type TypeQuery struct + Args []Type + Name EntityName + func (*TypeQuery) Kind() Kind + type TypeRef struct + Args []Type + Name EntityName + func Partial(t Type) *TypeRef + func Promise(t Type) *TypeRef + func ReadonlyOf(t Type) *TypeRef + func Record(k, v Type) *TypeRef + func Ref(name string, args ...Type) *TypeRef + func (*TypeRef) Kind() Kind + type UnaryExpr struct + Expr Expr + Op string + func (*UnaryExpr) Kind() Kind + type UndefinedLit struct + func (*UndefinedLit) Kind() Kind + type UnionType struct + Types []Type + func (*UnionType) Kind() Kind + type VarDecl struct + Bindings []*Binding + Docs *Doc + Mods Modifier + VarKind VarKind + func (*VarDecl) Kind() Kind + type VarKind uint8 + const VarAwaitUsing + const VarConst + const VarLet + const VarUsing + const VarVar + func (v VarKind) String() string + type Variance uint8 + const VarianceIn + const VarianceInOut + const VarianceNone + const VarianceOut + type Visitor interface + Visit func(Node) Visitor + type VisitorFunc func(Node) bool + func (f VisitorFunc) Visit(n Node) Visitor