API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeAnySceneConstructor

@codexo/exojs / core / stable

A SceneConstructor for any activation-data type - used for registry storage and navigation targets whose `Data` is not statically known. Union of the `void` and `any` instantiations, not just `SceneConstructor<any>` alone: `Scene.load`/`Scene.init` take their data parameter as `Readonly<Data>`, and TypeScript's structural check for a construct signature's return type does not collapse `Readonly<any>` against a concrete subclass's `Readonly<void>` parameter once that subclass has any of its own members (true of virtually every real scene) - `SceneConstructor<any>` alone then silently rejects the single most common case, a plain `Scene` (`Data = void`) subclass. Including the `void` arm explicitly gives every void-data scene an exact-match branch, while `any` still covers every data-carrying scene.

0
props
0
methods
0
events
Import
import { AnySceneConstructor } from '@codexo/exojs'

A SceneConstructor for any activation-data type - used for registry storage and navigation targets whose `Data` is not statically known.

Union of the `void` and `any` instantiations, not just `SceneConstructor<any>` alone: `Scene.load`/`Scene.init` take their data parameter as `Readonly<Data>`, and TypeScript's structural check for a construct signature's return type does not collapse `Readonly<any>` against a concrete subclass's `Readonly<void>` parameter once that subclass has any of its own members (true of virtually every real scene) - `SceneConstructor<any>` alone then silently rejects the single most common case, a plain `Scene` (`Data = void`) subclass. Including the `void` arm explicitly gives every void-data scene an exact-match branch, while `any` still covers every data-carrying scene.

Definition1
Source