@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
29 lines (28 loc) • 819 B
TypeScript
declare type Type = new (...args: any[]) => any;
declare class _TypeStore {
private _types;
constructor();
/**
* add a type to the store
*/
add(key: string, type: Type): void;
/**
* @returns the type for the given key if registered
*/
get(key: string): Type | null;
/**
* @returns the key/name for the given type if registered
*/
getKey(type: Type): string | null;
}
export declare const $BuiltInTypeFlag: unique symbol;
export declare const TypeStore: _TypeStore;
/**
* add to a class declaration to automatically register it to the TypeStore (required for HMR right now)
*
* `@registerType`
*
* `export class MyType extends Behaviour { ... }`
*/
export declare const registerType: (constructor: Type) => void;
export {};