Class: Namespace

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Namespace(parent, lifecycle)

Parameters

Name Type
parent null | Namespace
lifecycle Lifecycle

Properties

_lifeCycle

Private Readonly _lifeCycle: any


_objects

Private Readonly _objects: any


_objectsByType

Private Readonly _objectsByType: any


_parent

Private Readonly _parent: any

Accessors

isRoot

get isRoot(): boolean

Returns

boolean


parent

get parent(): null | Namespace

Returns

null | Namespace

Methods

[scopeDisposeSymbol]

[scopeDisposeSymbol](): void

Returns

void

Implementation of

ScopeDisposable.[scopeDisposeSymbol]


addObject

addObject(name, object): void

Parameters

Name Type
name string
object any

Returns

void


addObjectByType

addObjectByType<T>(type, object): void

Type parameters

Name Type
T extends Constructor<any>

Parameters

Name Type
type T
object InstanceType<T>

Returns

void


findObject

findObject<T>(name): null | T

Type parameters

Name
T

Parameters

Name Type
name string

Returns

null | T


findObjectByType

findObjectByType<T>(type): null | T

Type parameters

Name
T

Parameters

Name Type
type Constructor<T>

Returns

null | T


removeObject

removeObject(name): void

Parameters

Name Type
name string

Returns

void


removeObjectByType

removeObjectByType<T>(type): void

Type parameters

Name Type
T extends Constructor<any>

Parameters

Name Type
type T

Returns

void