gentypedefs

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTypeDefHeader = `/* tslint:disable */
/* eslint:disable */
// Automatically generated by gen_type_defs. Do not edit.
`
View Source
const TopLevelNamespace = "__TOP_LEVEL_MODULE__"

Variables

This section is empty.

Functions

func Generate

func Generate(cfg Config) error

Types

type Config

type Config struct {
	// The version string to embed
	ReleaseVersion string

	// The path to the intermediate type definition file.
	TypeDefFile string

	// The path to the .d.ts output file.
	DtsOutputFile string

	// The path to the .cjs output file.
	CjsOutputFile string
}

type TypeDefKind

type TypeDefKind string
const (
	TypeDefKindConst     TypeDefKind = "const"
	TypeDefKindEnum      TypeDefKind = "enum"
	TypeDefKindInterface TypeDefKind = "interface"
	TypeDefKindFn        TypeDefKind = "fn"
	TypeDefKindStruct    TypeDefKind = "struct"
	TypeDefKindImpl      TypeDefKind = "impl"
)

type TypeDefLine

type TypeDefLine struct {
	Kind         TypeDefKind `json:"kind"`
	Name         string      `json:"name"`
	OriginalName string      `json:"original_name,omitempty"`
	Def          string      `json:"def"`
	JSDoc        string      `json:"js_doc,omitempty"`
	JSMod        string      `json:"js_mod,omitempty"`
}

Jump to

Keyboard shortcuts

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