Packages

object TSType

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TSType
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def alias[T](name: String, tsType: TypescriptType): TSNamedType[T]

    Create a Typescript alias "name" for type T, with the definition of tsType

    Create a Typescript alias "name" for type T, with the definition of tsType

    Example:
    1. alias[Foo]("IFoo", TSString) will generate typescript type IFoo = string

    See also

    sameAs

  5. def alias[T, Alias](name: String)(implicit tsType: TSType[Alias]): TSNamedType[T]

    Create a Typescript alias "name" for type T, with the definition of Alias

    Create a Typescript alias "name" for type T, with the definition of Alias

    Example:
    1. alias[Foo, String]("IFoo") will generate typescript type IFoo = string

    See also

    sameAs

  6. def alias[T, Alias](implicit tsType: TSType[Alias], ct: Manifest[T]): TSNamedType[T]

    Create a Typescript alias "T" for type T, with the definition of Alias

    Create a Typescript alias "T" for type T, with the definition of Alias

    Example:
    1. alias[Foo, String] will generate typescript type Foo = string

    See also

    sameAs

  7. def apply[T](tt: TypescriptType): TSType[T]
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def external[T](name: String): TSNamedType[T]

    Create "name" as the typescript type for T, with "name" being defined elsewhere external[Foo]("IXyz") will use "IXyz" as the typescript type every time something contains a Foo

  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. macro def fromCaseClass[T]: TSIType[T]

    Generate a typescript interface for a case class

  15. macro def fromSealed[T]: TSNamedType[T]

    Generate a Typescript discriminated union from a scala sealed trait

    Generate a Typescript discriminated union from a scala sealed trait

    Example:
    1. sealed trait AorB case class A(foo: Int) extends AorB case class B(bar: Int) extends AorB implicit val tsAorB = TSType.fromSealed[AorB] wil produce type AorB = A | B

    See also

    [Typescript docs on Discrimintated Unions](https://www.typescriptlang.org/docs/handbook/advanced-types.html#discriminated-unions)

  16. def get[T](implicit tsType: TSType[T]): TSType[T]

    Get an implicit TSType[T]

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. macro def getOrGenerate[T]: TSType[T]

    Get an implicit TSType[T] or generate a default one

    Get an implicit TSType[T] or generate a default one

    By default Case class will use fromCaseClass Sealed traits/classes will use fromSealed

  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def interface[T](members: (String, TypescriptType)*)(implicit ct: Manifest[T]): TSIType[T]

    Create an interface "IClassname" for T

    Create an interface "IClassname" for T

    Example:
    1. interface[Foo]("bar" -> TSString) will output "interface IFoo { bar: string }"

  21. def interface[T](name: String, members: (String, TypescriptType)*): TSIType[T]

    Create an interface "name" for T

    Create an interface "name" for T

    Example:
    1. interface[Foo]("MyFoo", "bar" -> TSString) will output "interface MyFoo { bar: string }"

  22. def interfaceIndexed[T](name: String, indexName: String = "key", indexType: TypescriptType = TSString, valueType: TypescriptType): TSNamedType[T]

    Create an indexed interface for T

    Create an indexed interface for T

    Example:
    1. interfaceIndexed[Foo]("IFooLookup", "key", TSString, TSInt) will output "interface IFooLookup { [key: string] : Int }"

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def sameAs[Source, Target](implicit tsType: TSType[Target]): TSType[Source]

    Uses the typescript type of Target whenever we're looking for the typescript type of Source This will not generate a type Source = Target line like alias

    Uses the typescript type of Target whenever we're looking for the typescript type of Source This will not generate a type Source = Target line like alias

    See also

    alias

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped