Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace valuetypes

Callable

  • Enum<T>(obj: T): T
  • en

    Define an enum type.
    If a enum item has a value of -1, it will be given an Integer number according to it's order in the list.
    Otherwise it will use the value specified by user who writes the enum definition.

    zh

    定义一个枚举类型。
    用户可以把枚举值设为任意的整数,如果设为 -1,系统将会分配为上一个枚举值 + 1。

    Type parameters

    • T

    Parameters

    • obj: T

      a JavaScript literal object containing enum names and values, or a TypeScript enum type

    Returns T

    the defined enum type

Index

Interfaces

Generated using TypeDoc