interface InstanceEvent extends ConstructEvent { instance: InstType; } interface InstanceDestroyEvent extends InstanceEvent { isEndingLayout: boolean; } interface InstanceEventMap { "destroy": InstanceDestroyEvent; } /** Represents a single instance of an object type. * @see {@link https://www.construct.net/make-games/manuals/construct-3/scripting/scripting-reference/object-interfaces/iinstance | IInstance documentation } */ declare class IInstance { // Note IInstance does not derive from ConstructEventTargetDispatcher - it implements it // separately to make use of in its type definition. addEventListener>(type: K, listener: (ev: InstanceEventMap[K]) => any): void; removeEventListener>(type: K, listener: (ev: InstanceEventMap[K]) => any): void; dispatchEvent(evt: ConstructEvent): void; readonly runtime: IRuntime; readonly objectType: IObjectType; readonly plugin: IPlugin_; readonly uid: number; readonly iid: number; readonly templateName: string; timeScale: number; restoreTimeScale(): void; readonly dt: number; hasTag(tag: string): boolean; hasTags(...tagsArray: string[]): boolean; setAllTags(tagsSet: Iterable): void; getAllTags(): Set; destroy(): void; getOtherContainerInstances(): IInstance[]; otherContainerInstances(): Generator; signal(tag: string): void; waitForSignal(tag: string): Promise; }