24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
/**
|
||
* Copyright (c) 2026 Dominic Masters
|
||
*
|
||
* This software is released under the MIT License.
|
||
* https://opensource.org/licenses/MIT
|
||
*/
|
||
|
||
/**
|
||
* An event proxy with up to 4 subscribable callback slots (indices 0–3).
|
||
* Assign a function to subscribe; assign `null` to unsubscribe.
|
||
*
|
||
* @example
|
||
* assets.onLoaded[0] = () => { Console.print('all loaded'); };
|
||
* assets.onLoaded[0] = null; // unsubscribe
|
||
*/
|
||
interface AssetEventProxy {
|
||
0: (() => void) | null;
|
||
1: (() => void) | null;
|
||
2: (() => void) | null;
|
||
3: (() => void) | null;
|
||
/** Number of available slots (always 4). */
|
||
readonly length: number;
|
||
}
|