DeclarationMapper

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

Maps EnumDeclaration as TypeScript enum (rather than union type as default).

Maps EnumDeclaration as TypeScript enum (rather than union type as default).

Maps SingletonDeclaration as TypeScript const and literal type (super interface is ignored).

Maps SingletonDeclaration as TypeScript const and literal type (super interface is ignored).

  • If the singleton doesn't declare any value, uses its name as literal.
  • If the singleton declares a single value, uses it content as literal.
  • If the singleton declared multiple values, uses them as literal object.

Maps UnionDeclaration as simple TypeScript union type (rather than interface as default).

Maps UnionDeclaration as simple TypeScript union type (rather than interface as default).

Declared fields and super interface are ignored.

Maps TaggedDeclaration as TypeScript <valueType> & { <name>: undefined } (rather than type alias for <valueType>).

Maps TaggedDeclaration as TypeScript <valueType> & { <name>: undefined } (rather than type alias for <valueType>).

Types

type Resolved = (Declaration, PrintStream) => Unit