Documentation
¶
Index ¶
- Constants
- Variables
- type AssignExpr
- type BasicType
- type BinaryExpr
- type Brack
- type Comment
- type CommentPosition
- type Commenter
- type Decl
- type EOL
- type EnumType
- type ExportKeyword
- type ExportNamespace
- type ExportSet
- type Expr
- type File
- type Ident
- type Idents
- type ImportSpec
- type IndexExpr
- type InterfaceType
- type KeyValueExpr
- type ListExpr
- type ListLit
- type Names
- type Node
- type Num
- type ObjectLit
- type ParenExpr
- type Quot
- type Raw
- type SelectorExpr
- type Str
- type Type
- type TypeDecl
- type TypeTransformExpr
- type UnaryExpr
- type VarDecl
Constants ¶
View Source
const Indent = " "
Variables ¶
View Source
var ErrBadIdent = errors.New("typescript idents must contain only alphanumeric characters")
Functions ¶
This section is empty.
Types ¶
type AssignExpr ¶
func (AssignExpr) String ¶
func (a AssignExpr) String() string
type BinaryExpr ¶
func (BinaryExpr) String ¶
func (b BinaryExpr) String() string
type Comment ¶ added in v0.1.0
type Comment struct { Text string // text of comment, excluding '\n' for //-style Pos CommentPosition }
type CommentPosition ¶ added in v0.1.0
type CommentPosition int
CommentPosition indicates the position at which a comment should be printed, relative to its associated Node.
const ( // CommentAbove places a comment on a new line above the associated Node, // preserving indentation. CommentAbove CommentPosition = iota // CommentInline places a comment inline following the associated Node. CommentInline // CommentBelow places a comment after the associated Node, on a new line, // preserving indentation. CommentBelow )
type ExportKeyword ¶ added in v0.1.0
func (ExportKeyword) Comments ¶ added in v0.1.0
func (e ExportKeyword) Comments() []Comment
func (ExportKeyword) String ¶ added in v0.1.0
func (e ExportKeyword) String() string
type ExportNamespace ¶ added in v0.1.0
func (ExportNamespace) Comments ¶ added in v0.1.1
func (e ExportNamespace) Comments() []Comment
func (ExportNamespace) String ¶ added in v0.1.0
func (e ExportNamespace) String() string
type File ¶
type File struct { // file-level doc. Printed first at start of file, if non-nil Doc *Comment Imports []ImportSpec Nodes []Decl }
type ImportSpec ¶
type ImportSpec struct { TypeOnly bool Imports Idents // Only used for the namespace-form import, when Imports is empty AsName string From Str CommentList []Comment }
func (ImportSpec) Comments ¶ added in v0.1.1
func (i ImportSpec) Comments() []Comment
func (ImportSpec) String ¶
func (i ImportSpec) String() string
type InterfaceType ¶
type InterfaceType struct { Elems []KeyValueExpr Extends []Expr }
func (InterfaceType) String ¶
func (i InterfaceType) String() string
type KeyValueExpr ¶
func (KeyValueExpr) Comments ¶ added in v0.1.0
func (k KeyValueExpr) Comments() []Comment
func (KeyValueExpr) String ¶
func (k KeyValueExpr) String() string
type ListExpr ¶
type ListExpr struct {
Expr
}
ListExpr represents lists in type definitions, like string[].
type ObjectLit ¶
type ObjectLit struct { Comment []Comment Elems []KeyValueExpr IsType bool IsMap bool // contains filtered or unexported fields }
type SelectorExpr ¶
func (SelectorExpr) String ¶
func (s SelectorExpr) String() string
type TypeTransformExpr ¶
func (TypeTransformExpr) String ¶
func (tt TypeTransformExpr) String() string
Click to show internal directories.
Click to hide internal directories.