Options
All
  • Public
  • Public/Protected
  • All
Menu

Class App

Application Class 应用主类

Hierarchy

  • App

Index

Properties

Static _bus

_bus: EventBus = new EventBus(App)

Methods

Static NS

  • NS(): string
  • Application's namespace: {appName}/{version} 应用的名称空间:{应用名}/{版本号}

    Returns string

Static appName

  • appName(): string
  • Application's name 应用名称

    Returns string

Static fireEvent

  • Fires an applition-level event. 触发一个应用事件

    Type parameters

    • E

    Parameters

    Returns void

Static init

  • Application needs to be initialized first. 应用需要先初始化

    Parameters

    Returns void

Static logger

  • logger(): Log
  • Returns the logger of application. 返回应用的日志类

    Returns Log

Static offEvent

  • offEvent(e: string): void
  • Cancels all listeners of an applition-level event. 取消一个应用事件的所有监听

    Parameters

    • e: string

    Returns void

Static onEvent

  • onEvent<H>(e: string, handler: H, once?: boolean): void
  • Listen an applition-level event. 监听一个应用事件

    Type parameters

    • H

    Parameters

    • e: string
    • handler: H
    • Optional once: boolean

    Returns void

Static properties

  • Read the global options. 读取所有自定义配置

    Returns JsonObject

  • Write the global options. 覆写所有自定义配置

    Parameters

    Returns App

Static property

  • property(key: string): any
  • property(key: string, val: any): App
  • Read the key option. 读取配置项

    Parameters

    • key: string

    Returns any

  • Write the key option. 覆写配置项

    Parameters

    • key: string
    • val: any

    Returns App

Static version

  • version(): string
  • Application's version: {x}.{y}.{z} 版本号: {x}.{y}.{z}

    Returns string