Skip to content

Class: MapScriptRegistry<TCamera> ​

Mutable registry used by hosts and tests.

Type Parameters ​

Type ParameterDefault type
TCameraunknown

Implements ​

Constructors ​

Constructor ​

ts
new MapScriptRegistry<TCamera>(scripts?): MapScriptRegistry<TCamera>;

Seeds the registry from a { uid: constructor } map.

Parameters ​

ParameterType
scripts?Record<string, ScriptConstructor<TCamera>>

Returns ​

MapScriptRegistry<TCamera>

Methods ​

register() ​

ts
register(uid, ctor): void;

Registers or replaces the constructor for uid.

Parameters ​

ParameterType
uidstring
ctorScriptConstructor<TCamera>

Returns ​

void


unregister() ​

ts
unregister(uid): void;

Removes the constructor registered for uid.

Parameters ​

ParameterType
uidstring

Returns ​

void


get() ​

ts
get(uid): 
  | ScriptConstructor<TCamera>
  | undefined;

Returns the constructor registered for uid, or undefined.

Parameters ​

ParameterType
uidstring

Returns ​

| ScriptConstructor<TCamera> | undefined

Implementation of ​

ScriptRegistry.get


has() ​

ts
has(uid): boolean;

True when uid has a registered constructor.

Parameters ​

ParameterType
uidstring

Returns ​

boolean


clear() ​

ts
clear(): void;

Removes every registration.

Returns ​

void

Suity developer documentation · API generated by TypeDoc