ts

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModuleLayout

func NewModuleLayout(w io.Writer) typex.Layout

NewModuleLayout implements the Layout interface.

Types

type StructTag

type StructTag string

A StructTag is the tag string in a struct field.

By convention, tag strings are a concatenation of optionally space-separated key:"value" pairs. Each key is a non-empty string consisting of non-control characters other than space (U+0020 ' '), quote (U+0022 '"'), and colon (U+003A ':'). Each value is quoted using U+0022 '"' characters and Go string literal syntax.

func (StructTag) Get

func (t StructTag) Get(key string) (string, TagOptions)

Get returns the values associated with key and options in the tag string.

type TagOptions

type TagOptions string

TagOptions is the string following a comma in a struct field's tag, or the empty string. It does not include the leading comma.

func (TagOptions) Contains

func (o TagOptions) Contains(name string) bool

Contains reports whether a comma-separated list of options contains a particular substr flag. substr must be surrounded by a string boundary or commas.

type TypeRender

type TypeRender struct {
	PathReplaceFunc   typex.PathReplaceFunc
	IncludeUnexported bool
	// contains filtered or unexported fields
}

TypeRender renders TypeScript types or classes.

func (*TypeRender) Render

func (r *TypeRender) Render(m typex.TypeMap, exportObj bool) typex.PathMap

Render converts a TypeMap to a PathMap.

Jump to

Keyboard shortcuts

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