Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ManifestBase<TTarget, TRawResource, TResource>

Type parameters

Hierarchy

Index

Constructors

constructor

  • new ManifestBase<TTarget, TRawResource, TResource>(type: string): ManifestBase<TTarget, TRawResource, TResource>

Properties

Protected _data

_data: IResourceManagerManifest<TTarget> = {}

Protected _resources

_resources: ILoaderResourceDictionary<TResource> = {}

Private _type

_type: string

Accessors

count

  • get count(): number

Methods

Protected Abstract _createLoader

  • _createLoader(): LoaderBase<TTarget, TRawResource, TResource>

add

cemit

  • cemit(type: string, context: any, ...args: any[]): ManifestBase<TTarget, TRawResource, TResource>
  • Emit event with specifying a context.

    Parameters

    • type: string

      Event type to emit.

    • context: any

      Context to execute the callback.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns ManifestBase<TTarget, TRawResource, TResource>

cemitAll

  • cemitAll(context: any, ...args: any[]): ManifestBase<TTarget, TRawResource, TResource>
  • Emit all events with specifying a context.

    Parameters

    • context: any

      Context to execute the callback.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns ManifestBase<TTarget, TRawResource, TResource>

clear

  • clear(type?: string): ManifestBase<TTarget, TRawResource, TResource>
  • Remove events grouped event type.

    Parameters

    • Optional type: string

      Event type to remove. If it is empty, removes all events.

    Returns ManifestBase<TTarget, TRawResource, TResource>

destroyResources

  • destroyResources(): void

emit

  • emit(type: string, ...args: any[]): ManifestBase<TTarget, TRawResource, TResource>
  • Emit event.

    Parameters

    • type: string

      Event type to emit.

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns ManifestBase<TTarget, TRawResource, TResource>

emitAll

  • emitAll(...args: any[]): ManifestBase<TTarget, TRawResource, TResource>
  • Emit all events.

    Parameters

    • Rest ...args: any[]

      Argument(s) in callback.

    Returns ManifestBase<TTarget, TRawResource, TResource>

getAsync

off

  • off(type: string, callback: IEmitterDelegate): ManifestBase<TTarget, TRawResource, TResource>
  • Unregister event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Registered callback.

    Returns ManifestBase<TTarget, TRawResource, TResource>

on

  • on(type: string, callback: IEmitterDelegate): ManifestBase<TTarget, TRawResource, TResource>
  • Register event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Callback when the event fires.

    Returns ManifestBase<TTarget, TRawResource, TResource>

once

  • once(type: string, callback: IEmitterDelegate): ManifestBase<TTarget, TRawResource, TResource>
  • Register one-time event.

    Parameters

    • type: string

      Event type.

    • callback: IEmitterDelegate

      Callback when the event fires.

    Returns ManifestBase<TTarget, TRawResource, TResource>

Generated using TypeDoc