SingletonAsLiteral

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.
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(parent: Resolved, settings: Settings, typeMapper: Resolved, fieldMapper: FieldMapper, declaration: Declaration, out: PrintStream): Option[Unit]
Value parameters:
declaration

the transpiled declaration to be emitted

fieldMapper

the field mapper

out

the printer to output the code

parent

the parent declaration mapper

settings

the current settings

typeMapper

the resolved type mapper

Returns:

Some print operation, or None if declaration is not handled

Inherited methods

def curried: T1 => T2 => T3 => T4 => T5 => T6 => R
Inherited from:
Function6
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Inherited from:
DeclarationMapper
def tupled: ((T1, T2, T3, T4, T5, T6)) => R
Inherited from:
Function6