Documentation
¶
Overview ¶
Package typescript generates TypeScript type declarations from a resolved model.
docs/design/schema-backends.md has the mapping and the reasons for it. What it emits describes JSON on the wire rather than runtime objects: interfaces and type aliases, no classes, and no code. That is why a set is an array, a map is a Record, and every primitive TypeScript has no JSON form for is a string. An enum whose variants carry fields is a discriminated union on a `kind` field holding the variant's name, which a `discriminant` directive renames.
Index ¶
Constants ¶
const Name = "typescript"
Name is what this backend is called, in a target block and as tdl-gen-typescript on PATH.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct{}
Backend implements plugin.Backend.
func (Backend) Describe ¶
func (Backend) Describe() plugin.Description