SingletonAsLiteral

io.github.scalats.core.DeclarationMapper$.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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

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

Attributes

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

Attributes

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.

Attributes

Returns:

a string representation of the object.

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

Attributes

Inherited from:
Function6