@wayward/types 2.14.2-beta.dev.20241222.1 → 2.14.3-beta.dev.20241224.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/IGlobal.d.ts +3 -0
- package/definitions/game/event/EventBuses.d.ts +12 -8
- package/definitions/game/event/EventManager.d.ts +5 -4
- package/definitions/game/game/Game.d.ts +2 -0
- package/definitions/game/game/entity/Entity.d.ts +11 -9
- package/definitions/game/game/entity/EntityWithStats.d.ts +2 -1
- package/definitions/game/game/entity/IEntity.d.ts +2 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +11 -0
- package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +7 -1
- package/definitions/game/game/entity/ai/AI.d.ts +4 -0
- package/definitions/game/game/entity/ai/AiManager.d.ts +2 -2
- package/definitions/game/game/entity/creature/Creature.d.ts +3 -3
- package/definitions/game/game/entity/npc/NPC.d.ts +5 -6
- package/definitions/game/game/entity/player/Player.d.ts +2 -2
- package/definitions/game/game/inspection/InfoProvider.d.ts +2 -1
- package/definitions/game/game/inspection/InspectionsHandler.d.ts +2 -1
- package/definitions/game/game/island/Island.d.ts +3 -0
- package/definitions/game/game/item/ItemFinder.d.ts +1 -1
- package/definitions/game/mod/IMod.d.ts +2 -1
- package/definitions/game/renderer/world/WorldRenderer.d.ts +4 -0
- package/definitions/game/save/data/SaveData.d.ts +2 -0
- package/definitions/game/save/data/SaveDataGlobal.d.ts +2 -0
- package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +6 -0
- package/definitions/game/save/upgrade/UpgradeVersion.d.ts +6 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/_beta.2.14.0-dev20240828.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev1.d.ts → beta2.14.0-dev00000001.d.ts} +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev2.d.ts → beta2.14.0-dev00000002.d.ts} +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240827.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240828.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240829.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240901.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240905.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241024.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241129.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.14.3/beta2.14.3-dev20241223.d.ts +12 -0
- package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
- package/definitions/game/steamworks/Steamworks.d.ts +15 -0
- package/definitions/game/ui/component/ContextMenu.d.ts +1 -1
- package/definitions/game/ui/component/IComponent.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +2 -43
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +36 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentHandler.d.ts +46 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentTradeManager.d.ts +32 -0
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +3 -2
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +2 -1
- package/definitions/game/utilities/Version.d.ts +16 -7
- package/definitions/hosts/shared/globalTypes.d.ts +4 -0
- package/definitions/hosts/shared/globals.d.ts +2 -2
- package/definitions/utilities/Errors.d.ts +10 -0
- package/definitions/utilities/Log.d.ts +5 -0
- package/definitions/utilities/collection/map/IterableWeakMap.d.ts +35 -0
- package/definitions/utilities/collection/map/LimitedMap.d.ts +45 -0
- package/definitions/utilities/event/EventEmitter.d.ts +27 -3
- package/definitions/utilities/event/EventManager.d.ts +11 -1
- package/package.json +1 -1
@@ -21,6 +21,7 @@ export interface ISteamworksEvents {
|
|
21
21
|
onSteamNetworkingMessagesSessionRequest(steamIdRemote: string): void;
|
22
22
|
onSteamNetworkingMessagesSessionFailed(steamIdRemote: string, state: SteamNetworkingConnectionState, endReason: number): void;
|
23
23
|
requestJoinServer(serverInfo: ServerInfo): any;
|
24
|
+
changeBuildId(): any;
|
24
25
|
}
|
25
26
|
export interface IModPath {
|
26
27
|
path: string;
|
@@ -20,6 +20,7 @@ import { SteamStatArea } from "@wayward/game/steamworks/ISteamworks";
|
|
20
20
|
import type { ISteamBeta } from "@wayward/hosts/shared/interfaces";
|
21
21
|
import { type IMatchmakingServer, type INapiDiscordPresenceInfo, type IRemoteFile, type ISteamFriend, type ISteamId, type ISteamworksNetworking, type IWaywardPreload, type IWorkshopItem, type LobbyType } from "@wayward/hosts/shared/interfaces";
|
22
22
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
23
|
+
import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
|
23
24
|
export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
24
25
|
private readonly game;
|
25
26
|
protected initialized: boolean;
|
@@ -88,6 +89,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
88
89
|
getMatchmakingServer(): IMatchmakingServer | undefined;
|
89
90
|
getMatchmakingServerPort(): number;
|
90
91
|
getSteamNetworking(): ISteamworksNetworking | undefined;
|
92
|
+
setBuildId(id?: string): void;
|
91
93
|
initialize(): Promise<IWaywardPreload | undefined>;
|
92
94
|
enableSafePaths(): void;
|
93
95
|
onUnload(): void;
|
@@ -114,6 +116,19 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
114
116
|
* - {@link Island.saveBuildTime}
|
115
117
|
*/
|
116
118
|
get buildTime(): number;
|
119
|
+
/**
|
120
|
+
* Returns the build ID of the game, not depending on any save that's currently loaded.
|
121
|
+
*
|
122
|
+
* **Note that this is NOT based on the deploy ID.** If a deploy reuses a previous build, for example due to no new commits happening,
|
123
|
+
* or due to the tests failing, this build ID will be for that previous build even if the deploy ID is different.
|
124
|
+
*
|
125
|
+
* Build IDs are saved in the following places:
|
126
|
+
* - {@link saveDataGlobal.gameLastPlayedBuildId}
|
127
|
+
* - {@link saveData.gameBuildId}
|
128
|
+
* - {@link Island.mapGenBuildId}
|
129
|
+
* - {@link Island.saveBuildId}
|
130
|
+
*/
|
131
|
+
get buildId(): IBuildId | undefined;
|
117
132
|
getPublishedMods(): IWorkshopItem[] | undefined;
|
118
133
|
getStatInt(name: string): number | undefined;
|
119
134
|
/**
|
@@ -14,7 +14,7 @@ import Component from "@wayward/game/ui/component/Component";
|
|
14
14
|
import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
|
15
15
|
import Text, { Heading } from "@wayward/game/ui/component/Text";
|
16
16
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
17
|
-
import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/
|
17
|
+
import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
18
18
|
import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
|
19
19
|
import type { IDraggableComponent, IDraggableEvents } from "@wayward/game/ui/util/Draggable";
|
20
20
|
import Draggable from "@wayward/game/ui/util/Draggable";
|
@@ -14,7 +14,8 @@ import type { ISerializedTranslation } from "@wayward/game/language/ITranslation
|
|
14
14
|
import type Translation from "@wayward/game/language/Translation";
|
15
15
|
import type Component from "@wayward/game/ui/component/Component";
|
16
16
|
import type { IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
17
|
-
|
17
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
18
|
+
export interface IComponentEvents extends IEventSubscriberEvents {
|
18
19
|
show(): any;
|
19
20
|
hide(): any;
|
20
21
|
toggleVisible(visible: boolean): any;
|
@@ -8,29 +8,23 @@
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
|
-
import { Quality } from "@wayward/game/game/IObject";
|
12
11
|
import { EquipType } from "@wayward/game/game/entity/IHuman";
|
13
12
|
import type { ActionId } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
14
|
-
import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
|
15
|
-
import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
|
16
|
-
import type { IContainer, ItemTypeExtra } from "@wayward/game/game/item/IItem";
|
17
13
|
import { ItemType } from "@wayward/game/game/item/IItem";
|
18
14
|
import type Item from "@wayward/game/game/item/Item";
|
19
15
|
import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
|
20
16
|
import Component from "@wayward/game/ui/component/Component";
|
21
17
|
import type ContextMenu from "@wayward/game/ui/component/ContextMenu";
|
22
18
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
19
|
+
import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
23
20
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
24
21
|
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
25
22
|
import type { IDraggableEvents } from "@wayward/game/ui/util/Draggable";
|
26
23
|
import Draggable from "@wayward/game/ui/util/Draggable";
|
27
|
-
import type Sortable from "@wayward/game/ui/util/Sortable";
|
28
24
|
import type { ISortableDraggableEvents } from "@wayward/game/ui/util/Sortable";
|
29
25
|
import PerfCache from "@wayward/game/utilities/PerfCache";
|
30
26
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
31
|
-
import WeakishSet from "@wayward/utilities/collection/set/WeakishSet";
|
32
27
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
33
|
-
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
34
28
|
type ItemSlotExtend = Omit<Component, "event"> & {
|
35
29
|
event: IEventEmitter<Component, IItemSlotEvents>;
|
36
30
|
};
|
@@ -104,33 +98,6 @@ export declare enum ItemClasses {
|
|
104
98
|
export declare namespace ItemClasses {
|
105
99
|
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
|
106
100
|
}
|
107
|
-
export interface IItemComponentHandlerDescription {
|
108
|
-
noDrag?: true;
|
109
|
-
equipSlot?: EquipType;
|
110
|
-
hasHighlight?: SupplierOr<boolean>;
|
111
|
-
getItem?(): Item | undefined;
|
112
|
-
getItemType?(): ItemType | ItemTypeExtra | undefined;
|
113
|
-
getItemQuality?(): ArrayOr<Quality> | undefined;
|
114
|
-
getAction?(): UsableAction | undefined;
|
115
|
-
getActionSlot?(): ActionSlot | undefined;
|
116
|
-
getBindables?(bindables: Bindable[]): Bindable[];
|
117
|
-
getSortable?(): Sortable;
|
118
|
-
getStackQuantity?(): number;
|
119
|
-
getContainer?(): IContainer | undefined;
|
120
|
-
getStackItems?(): readonly Item[];
|
121
|
-
getStackDisplayItem?(): Item | undefined;
|
122
|
-
getDisplayItem?(): Item | undefined;
|
123
|
-
getDurability?(): number;
|
124
|
-
getCooldown?(): number;
|
125
|
-
isDamaged?(): boolean;
|
126
|
-
isDecayed?(): boolean;
|
127
|
-
}
|
128
|
-
export interface ItemComponentHandler extends IItemComponentHandlerDescription {
|
129
|
-
}
|
130
|
-
export declare class ItemComponentHandler {
|
131
|
-
readonly isItemComponentHandler = true;
|
132
|
-
constructor(description?: IItemComponentHandlerDescription);
|
133
|
-
}
|
134
101
|
export declare enum ItemTradeType {
|
135
102
|
None = "",
|
136
103
|
ToMerchant = "To",
|
@@ -164,19 +131,10 @@ export interface IItemComponentStaticEvents {
|
|
164
131
|
}
|
165
132
|
export default class ItemComponent extends Component implements ItemSlot {
|
166
133
|
readonly handler: ItemComponentHandler;
|
167
|
-
static readonly eventGlobal: EventEmitter<null, IItemComponentStaticEvents>;
|
168
134
|
static create<C extends ItemComponent = ItemComponent>(handler: ItemComponentHandler, ...params: any[]): C | undefined;
|
169
135
|
static registerSlot(slot: ItemSlot): void;
|
170
136
|
static getHovered(): ItemComponent | undefined;
|
171
137
|
static QUALITY_CLASS_NAMES: PerfCache<string[]>;
|
172
|
-
private static readonly tradingByItem;
|
173
|
-
private static readonly tradingToMerchant;
|
174
|
-
private static readonly tradingFromMerchant;
|
175
|
-
static getTrading(merchant: MerchantNPC, type: ItemTradeType): WeakishSet<Item> | undefined;
|
176
|
-
static isTrading(item: Item, merchant: MerchantNPC): boolean;
|
177
|
-
static toggleTrading(items: Item[], merchant: MerchantNPC, trading: ItemTradeType): ItemTradeType;
|
178
|
-
private static sendMerchantChatMessage;
|
179
|
-
static clearTrading(merchant?: MerchantNPC): void;
|
180
138
|
event: IEventEmitter<this, IItemComponentEvents>;
|
181
139
|
readonly magicalIcon: Component<HTMLElement> | undefined;
|
182
140
|
readonly protectedIcon: Component<HTMLElement> | undefined;
|
@@ -228,6 +186,7 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
228
186
|
protected onUpdateDecay(): void;
|
229
187
|
protected onUpdateQuality(): void;
|
230
188
|
protected onTickEnd(): void;
|
189
|
+
protected onRooted(): void;
|
231
190
|
protected onRootedAndAppend(): void;
|
232
191
|
protected onLoadedOnIsland(): void;
|
233
192
|
protected onActionBarItemSlottedMapUpdate(): void;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
import type { ItemRefreshType } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
12
|
+
import type ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
13
|
+
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
14
|
+
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
15
|
+
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
16
|
+
interface IItemComponentEventBusEvents {
|
17
|
+
update(type: ItemRefreshType): any;
|
18
|
+
changeHovered(): any;
|
19
|
+
}
|
20
|
+
declare namespace _ {
|
21
|
+
class ItemComponentEventBus extends EventEmitter.Host<IItemComponentEventBusEvents> {
|
22
|
+
private readonly items;
|
23
|
+
private readonly itemsForTickEndEvents;
|
24
|
+
registerItem(component: ItemComponent): void;
|
25
|
+
registerForTickEndEvents(component: ItemComponent): void;
|
26
|
+
deregisterForTickEndEvents(component: ItemComponent): void;
|
27
|
+
protected onUpdate(type: ItemRefreshType): void;
|
28
|
+
protected onSlotUpdate(actionBar: ActionBar, slot: ActionSlot): void;
|
29
|
+
protected onTickEnd(): void;
|
30
|
+
protected onLoadedOnIsland(): void;
|
31
|
+
protected onActionBarItemSlottedMapUpdate(): void;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
type ItemComponentEventBus = _.ItemComponentEventBus;
|
35
|
+
declare function ItemComponentEventBus(): ItemComponentEventBus;
|
36
|
+
export default ItemComponentEventBus;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
|
12
|
+
import type { EquipType } from "@wayward/game/game/entity/IHuman";
|
13
|
+
import type { Quality } from "@wayward/game/game/IObject";
|
14
|
+
import type { ItemTypeExtra, IContainer } from "@wayward/game/game/item/IItem";
|
15
|
+
import { ItemType } from "@wayward/game/game/item/IItem";
|
16
|
+
import type Item from "@wayward/game/game/item/Item";
|
17
|
+
import type Bindable from "@wayward/game/ui/input/Bindable";
|
18
|
+
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
19
|
+
import type Sortable from "@wayward/game/ui/util/Sortable";
|
20
|
+
export interface IItemComponentHandlerDescription {
|
21
|
+
noDrag?: true;
|
22
|
+
equipSlot?: EquipType;
|
23
|
+
hasHighlight?: SupplierOr<boolean>;
|
24
|
+
getItem?(): Item | undefined;
|
25
|
+
getItemType?(): ItemType | ItemTypeExtra | undefined;
|
26
|
+
getItemQuality?(): ArrayOr<Quality> | undefined;
|
27
|
+
getAction?(): UsableAction | undefined;
|
28
|
+
getActionSlot?(): ActionSlot | undefined;
|
29
|
+
getBindables?(bindables: Bindable[]): Bindable[];
|
30
|
+
getSortable?(): Sortable;
|
31
|
+
getStackQuantity?(): number;
|
32
|
+
getContainer?(): IContainer | undefined;
|
33
|
+
getStackItems?(): readonly Item[];
|
34
|
+
getStackDisplayItem?(): Item | undefined;
|
35
|
+
getDisplayItem?(): Item | undefined;
|
36
|
+
getDurability?(): number;
|
37
|
+
getCooldown?(): number;
|
38
|
+
isDamaged?(): boolean;
|
39
|
+
isDecayed?(): boolean;
|
40
|
+
}
|
41
|
+
export interface ItemComponentHandler extends IItemComponentHandlerDescription {
|
42
|
+
}
|
43
|
+
export declare class ItemComponentHandler {
|
44
|
+
readonly isItemComponentHandler = true;
|
45
|
+
constructor(description?: IItemComponentHandlerDescription);
|
46
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
import type Human from "@wayward/game/game/entity/Human";
|
12
|
+
import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
|
13
|
+
import type Item from "@wayward/game/game/item/Item";
|
14
|
+
import { ItemTradeType } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
15
|
+
import WeakishSet from "@wayward/utilities/collection/set/WeakishSet";
|
16
|
+
declare namespace _ {
|
17
|
+
class ItemComponentTradeManager {
|
18
|
+
private readonly tradingByItem;
|
19
|
+
private readonly tradingToMerchant;
|
20
|
+
private readonly tradingFromMerchant;
|
21
|
+
getTrading(merchant: MerchantNPC, type: ItemTradeType): WeakishSet<Item> | undefined;
|
22
|
+
getTradeType(item: Item): ItemTradeType | undefined;
|
23
|
+
isTrading(item: Item, merchant: MerchantNPC): boolean;
|
24
|
+
toggleTrading(items: Item[], merchant: MerchantNPC, trading: ItemTradeType): ItemTradeType;
|
25
|
+
private sendMerchantChatMessage;
|
26
|
+
clearTrading(merchant?: MerchantNPC): void;
|
27
|
+
onTrade(merchant: MerchantNPC, human: Human): void;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
type ItemComponentTradeManager = _.ItemComponentTradeManager;
|
31
|
+
declare function ItemComponentTradeManager(): ItemComponentTradeManager;
|
32
|
+
export default ItemComponentTradeManager;
|
@@ -14,8 +14,8 @@ import Component from "@wayward/game/ui/component/Component";
|
|
14
14
|
import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
15
15
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
16
16
|
import Dialog from "@wayward/game/ui/screen/screens/game/component/Dialog";
|
17
|
-
import type
|
18
|
-
import ItemComponent
|
17
|
+
import { ItemRefreshType, type IItemDropApi, type IItemPickUpApi, type ItemSlot } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
18
|
+
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
19
19
|
import EquipmentSlotTooltipHandler from "@wayward/game/ui/screen/screens/game/dialog/equipment/EquipmentSlotTooltip";
|
20
20
|
import { MenuBarButtonType } from "@wayward/game/ui/screen/screens/game/static/menubar/IMenuBarButton";
|
21
21
|
export declare enum EquipmentClasses {
|
@@ -25,8 +25,9 @@ import Component from "@wayward/game/ui/component/Component";
|
|
25
25
|
import type { IRefreshable } from "@wayward/game/ui/component/Refreshable";
|
26
26
|
import Text from "@wayward/game/ui/component/Text";
|
27
27
|
import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
28
|
-
import type
|
29
|
-
import ItemComponent
|
28
|
+
import { type IItemSlotEvents, type ItemSlot } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
29
|
+
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
30
|
+
import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
30
31
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
31
32
|
import { ActionSlotUpdateReason, IActionBarSlotData } from "@wayward/game/ui/screen/screens/game/static/actions/IActionBar";
|
32
33
|
import type TooltipLocationHandler from "@wayward/game/ui/tooltip/TooltipLocationHandler";
|
package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts
CHANGED
@@ -22,8 +22,9 @@ import HorizontalLine from "@wayward/game/ui/component/HorizontalLine";
|
|
22
22
|
import RangeChoiceList from "@wayward/game/ui/component/RangeChoiceList";
|
23
23
|
import Text, { Heading, Paragraph } from "@wayward/game/ui/component/Text";
|
24
24
|
import ItemDropdown from "@wayward/game/ui/component/dropdown/ItemDropdown";
|
25
|
-
import type {
|
25
|
+
import type { IItemDropApi, ItemSlot, IItemSlotEvents } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
26
26
|
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
27
|
+
import type { IItemComponentHandlerDescription } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
27
28
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
28
29
|
export declare enum ActionSlotConfigurationColumnClasses {
|
29
30
|
Main = "game-action-configuration-drawer-configuration-column",
|
@@ -9,6 +9,7 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
12
|
+
import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
|
12
13
|
export interface IVersionInfo {
|
13
14
|
str: Version.String;
|
14
15
|
strSemver: Version.StringSemVer;
|
@@ -22,6 +23,12 @@ export interface IVersionInfo {
|
|
22
23
|
* A number representing the patch (if beta) or minor (if release), used when the stage is not known
|
23
24
|
*/
|
24
25
|
update?: number;
|
26
|
+
buildId?: IBuildId;
|
27
|
+
}
|
28
|
+
export declare namespace IVersionInfo {
|
29
|
+
interface WithBuildId extends IVersionInfo {
|
30
|
+
buildId: IBuildId;
|
31
|
+
}
|
25
32
|
}
|
26
33
|
declare namespace Version {
|
27
34
|
export type Stage = "beta" | "release";
|
@@ -29,8 +36,10 @@ declare namespace Version {
|
|
29
36
|
export type StringSemVer = `${bigint}.${bigint}.${bigint}-${Stage}` | `${bigint}.${bigint}.${bigint}`;
|
30
37
|
export type Month = "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | "sep" | "oct" | "nov" | "dec";
|
31
38
|
export type DateString = `${Month} ${bigint} ${bigint} ${bigint | "00"}:${bigint | "00"}`;
|
39
|
+
export type StringBuildId = `${String}-dev${bigint}.${bigint}` | `${String}-dev${bigint}`;
|
32
40
|
export const versionInfoRegExp: RegExp;
|
33
41
|
export const versionInfoRegExpSemver: RegExp;
|
42
|
+
export const versionInfoWithBuildIdRegExp: RegExp;
|
34
43
|
/**
|
35
44
|
* Returns whether the given version is compatible with the game's version. This is used to check, for example,
|
36
45
|
* if a mod is compatible with the game's version.
|
@@ -46,20 +55,20 @@ declare namespace Version {
|
|
46
55
|
* - Compatible versions in "beta" stage require identical stage, major, minor, and a patch less than or equal to the current patch.
|
47
56
|
* - Compatible versions in "release" stage require identical stage and major, and a minor and patch less than or equal to the current minor and patch.
|
48
57
|
*/
|
49
|
-
export function is(versionA
|
58
|
+
export function is(versionA?: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId, versionB?: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): boolean;
|
50
59
|
/**
|
51
60
|
* Returns whether the given `version` is `atLeast` another version. This can be used, for example,
|
52
61
|
* to see if a save or mod was created/edited after a specific thing was implemented.
|
53
62
|
*/
|
54
|
-
export function isAtLeast(version: IVersionInfo | Version.String | Version.StringSemVer, atLeast: IVersionInfo | Version.String | Version.StringSemVer): boolean;
|
63
|
+
export function isAtLeast(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId, atLeast: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): boolean;
|
55
64
|
/**
|
56
65
|
* Returns if `checkVersion` is older than `isBefore`
|
57
66
|
*/
|
58
67
|
export function isBefore(checkVersion: IVersionInfo | Version.String | Version.StringSemVer, isBefore: IVersionInfo | Version.String | Version.StringSemVer): boolean;
|
59
68
|
export function createRawVersionInfo(stage: Version.Stage, major: number, minor: number, patch?: number, date?: Date): IVersionInfo;
|
60
|
-
export function convertStringToRawInfo(version: Version.String | Version.StringSemVer): IVersionInfo;
|
69
|
+
export function convertStringToRawInfo(version: Version.String | Version.StringSemVer | Version.StringBuildId): IVersionInfo;
|
61
70
|
export function create(stage: Version.Stage, major: number, minor: number, patch?: number, date?: Date): Info;
|
62
|
-
export function getVersionInfo(version: IVersionInfo | Version.String | Version.StringSemVer): Info;
|
71
|
+
export function getVersionInfo(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): Info;
|
63
72
|
export function isSameVersion(version: IVersionInfo, compareVersion: IVersionInfo): boolean;
|
64
73
|
export function getVersionDisplayTranslation(version?: Version.String | Version.StringSemVer | IVersionInfo, development?: boolean): TranslationImpl;
|
65
74
|
export function getUpdateDisplayTranslation(version?: Version.String | Version.StringSemVer | IVersionInfo): TranslationImpl | undefined;
|
@@ -85,16 +94,16 @@ declare namespace Version {
|
|
85
94
|
* Returns whether this version is greater than or equal to the given version. This can be used, for example,
|
86
95
|
* to see if a save or mod was created/edited after a specific thing was implemented.
|
87
96
|
*/
|
88
|
-
isAtLeast(version: IVersionInfo | Version.String | Version.StringSemVer): boolean;
|
97
|
+
isAtLeast(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): boolean;
|
89
98
|
/**
|
90
99
|
* Returns whether this version is greater than or equal to the given version. This can be used, for example,
|
91
100
|
* to see if a save or mod was created/edited after a specific thing was implemented.
|
92
101
|
*/
|
93
|
-
is(version: IVersionInfo | Version.String | Version.StringSemVer): boolean;
|
102
|
+
is(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): boolean;
|
94
103
|
/**
|
95
104
|
* Returns whether this version is older than the given version.
|
96
105
|
*/
|
97
|
-
isBefore(version: IVersionInfo | Version.String | Version.StringSemVer): boolean;
|
106
|
+
isBefore(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): boolean;
|
98
107
|
/**
|
99
108
|
* Returns whether this version is older than the given build time.
|
100
109
|
*
|
@@ -9,8 +9,8 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import type { IWaywardTitle } from "@wayward/hosts/shared/globalTypes";
|
12
|
-
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch =
|
13
|
-
export declare const gameVersion = "beta2.14.
|
12
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch = 3, gameVersionName = "Runekeeper", gameVersionColor = 11015763;
|
13
|
+
export declare const gameVersion = "beta2.14.3";
|
14
14
|
export declare const gameVersionTitleMajor = "Wayward: Runekeeper";
|
15
15
|
export declare const gameVersionTitleMinor: string;
|
16
16
|
export declare const gameVersionTitle: string;
|
@@ -14,6 +14,16 @@ declare namespace Errors {
|
|
14
14
|
function getStack(error: unknown): string | undefined;
|
15
15
|
function getName(error: unknown): string | undefined;
|
16
16
|
function getMessage(error: unknown): string | undefined;
|
17
|
+
/**
|
18
|
+
* Returns the callsite stack string starting from the caller of this function.
|
19
|
+
* @param skip The number of additional callsite strings to skip
|
20
|
+
* @param truncate The maximum number of callsite strings to include
|
21
|
+
*/
|
22
|
+
function stack(skip?: number, truncate?: number): string;
|
23
|
+
/**
|
24
|
+
* Returns the Error callsite string for the caller of the current function.
|
25
|
+
*/
|
26
|
+
function caller(skip?: number): string;
|
17
27
|
}
|
18
28
|
export default Errors;
|
19
29
|
export declare function ensureExhaustive(value: never): never;
|
@@ -123,6 +123,11 @@ declare namespace Log {
|
|
123
123
|
* @param sources A list of sources to log to.
|
124
124
|
*/
|
125
125
|
function trace(...sources: string[]): (...args: any[]) => void;
|
126
|
+
/**
|
127
|
+
* Warn about something once per session based on unique warning ids.
|
128
|
+
* This is like how node.js does warnings in console.
|
129
|
+
*/
|
130
|
+
function warnOncePerSession(warningId: string | string[], ...message: any[]): void;
|
126
131
|
}
|
127
132
|
declare class NullLog extends BaseLog {
|
128
133
|
setup(): void;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* Strong keys are stored in a Map.
|
13
|
+
* Weak keys are stored in a WeakMap.
|
14
|
+
* Based on https://github.com/tc39/proposal-weakrefs?tab=readme-ov-file#iterable-weakmaps
|
15
|
+
*/
|
16
|
+
export declare class IterableWeakMap<K, V> implements Iterable<[K, V]> {
|
17
|
+
#private;
|
18
|
+
constructor(iterable?: Iterable<[K, V]>);
|
19
|
+
/**
|
20
|
+
* This is more of an estimate since we might be waiting for some garbage collection to happen
|
21
|
+
*/
|
22
|
+
get size(): number;
|
23
|
+
/**
|
24
|
+
* This will cause keys that are cleaned up via garbage collection to be logged
|
25
|
+
*/
|
26
|
+
enableLogging(): IterableWeakMap<K, V>;
|
27
|
+
get(key: K): V | undefined;
|
28
|
+
set(key: K, value: V): this;
|
29
|
+
delete(key: K): boolean;
|
30
|
+
[Symbol.iterator](): Generator<[K, V]>;
|
31
|
+
entries(): IterableIterator<[K, V]>;
|
32
|
+
keys(): IterableIterator<K>;
|
33
|
+
values(): IterableIterator<V>;
|
34
|
+
private isWeakKey;
|
35
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
type MapIt<K, V> = Iterable<readonly [K, V]>;
|
12
|
+
type MapArr<K, V> = ReadonlyArray<readonly [K, V]>;
|
13
|
+
export default class LimitedMap<K, V> extends Map<K, V> {
|
14
|
+
readonly maxSize: number;
|
15
|
+
constructor(maxSize: number);
|
16
|
+
constructor(iterable: MapIt<K, V> | null, maxSize: number);
|
17
|
+
constructor(entries: MapArr<K, V> | null, maxSize: number);
|
18
|
+
private disposeHandler?;
|
19
|
+
/**
|
20
|
+
* Set a handler that handles when the map exceeds its limit, deleting the oldest item.
|
21
|
+
*
|
22
|
+
* Return `false` from the handler to instead "bump" the first item to the end, and then try to delete the oldest item again.
|
23
|
+
*
|
24
|
+
* Returning `false` for every item will forcibly delete the oldest item.
|
25
|
+
*/
|
26
|
+
setDisposeHandler(handler: (key: K, value: V, canCancel: boolean) => boolean | void): this;
|
27
|
+
/**
|
28
|
+
* 1. Sets the given key and value in the map.
|
29
|
+
* 2. If/while the map size exceeds the limit, the dispose handler is called for the oldest item.
|
30
|
+
* 3. If the handler returns `false`, the item is instead "bumped" to the end of the map.
|
31
|
+
* 4. If the handler returns `false` for every item, oldest items are forcibly deleted until the map no longer exceeds the limit.
|
32
|
+
*/
|
33
|
+
set(key: K, value: V): this;
|
34
|
+
private bumping;
|
35
|
+
bump(key: K): boolean;
|
36
|
+
/**
|
37
|
+
* Deletes the item with the given key, and calls the dispose handler if it's been set.
|
38
|
+
*/
|
39
|
+
delete(key: K): boolean;
|
40
|
+
/**
|
41
|
+
* Clears the map, calling the dispose handler for each item if it's been set.
|
42
|
+
*/
|
43
|
+
clear(): void;
|
44
|
+
}
|
45
|
+
export {};
|
@@ -8,6 +8,7 @@
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
|
+
import { IterableWeakMap } from "@wayward/utilities/collection/map/IterableWeakMap";
|
11
12
|
import { PriorityMap } from "@wayward/utilities/collection/map/PriorityMap";
|
12
13
|
export declare enum Priority {
|
13
14
|
Lowest = -2000,
|
@@ -24,12 +25,16 @@ type Abstract<T> = Function & {
|
|
24
25
|
};
|
25
26
|
type Constructor<T> = new (...args: any[]) => T;
|
26
27
|
type ClassOrAbstractClass<T> = Abstract<T> | Constructor<T>;
|
28
|
+
export interface IEventSubscriberEvents {
|
29
|
+
releaseEventSubscriptions(): any;
|
30
|
+
}
|
27
31
|
export interface IEventEmitterHost<E> {
|
28
32
|
event: IEventEmitter<this | null, E>;
|
29
33
|
}
|
30
34
|
export type IEventEmitterHostClass<E> = ClassOrAbstractClass<IEventEmitterHost<E>>;
|
31
35
|
export type Events<T> = T extends IEventEmitterHost<infer E> ? E : T extends IEventEmitterHostClass<infer E> ? E : never;
|
32
|
-
export type
|
36
|
+
export type EventPriorityMapKV = string | Handler<any, any>;
|
37
|
+
export type EventPriorityMap = PriorityMap<Map<EventPriorityMapKV, EventPriorityMapKV> | IterableWeakMap<EventPriorityMapKV, EventPriorityMapKV>>;
|
33
38
|
export interface ITrueEventEmitterHostClass<E> extends Class<any> {
|
34
39
|
[SYMBOL_SUPERCLASSES]: Array<ITrueEventEmitterHostClass<E>>;
|
35
40
|
[SYMBOL_SUBSCRIPTIONS]: Map<any, Map<keyof E, EventPriorityMap>>;
|
@@ -59,8 +64,14 @@ export interface IEventEmitter<H = any, E = any> {
|
|
59
64
|
emitAsyncParallel<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<Array<(Extract<ReturnOf<E[K]>, Promise<any>> extends Promise<infer R> ? R : never) | Exclude<ReturnOf<E[K]>, Promise<any>>>> & {
|
60
65
|
isResolved?: true;
|
61
66
|
};
|
67
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
68
|
+
/** @deprecated */
|
62
69
|
subscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
70
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
71
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
72
|
+
/** @deprecated */
|
63
73
|
subscribeNext<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
74
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
64
75
|
unsubscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): boolean;
|
65
76
|
waitFor<K extends ArrayOr<keyof E>>(events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
66
77
|
race<K extends ArrayOr<keyof E>>(raceWith: Promise<any>, events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
@@ -72,8 +83,14 @@ export interface IEventEmitter<H = any, E = any> {
|
|
72
83
|
export interface IUntilSubscriber<H, E> {
|
73
84
|
until(promise: Promise<any>): this;
|
74
85
|
until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): this;
|
86
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
87
|
+
/** @deprecated */
|
75
88
|
subscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
89
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
90
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
91
|
+
/** @deprecated */
|
76
92
|
subscribeNext<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
93
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
77
94
|
}
|
78
95
|
declare class EventEmitter<H, E> {
|
79
96
|
private readonly host;
|
@@ -92,8 +109,15 @@ declare class EventEmitter<H, E> {
|
|
92
109
|
emitReduce<K extends keyof E, A extends ReturnOf<E[K]> & Head<ArgsOf<E[K]>>>(event: K, arg: A, ...args: Tail<ArgsOf<E[K]>>): Extract<ReturnOf<E[K]> & Head<ArgsOf<E[K]>>, undefined> extends undefined ? (undefined extends A ? ReturnOf<E[K]> : A) : ReturnOf<E[K]>;
|
93
110
|
emitAsync<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<any[]>;
|
94
111
|
emitAsyncParallel<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<any[]>;
|
95
|
-
|
96
|
-
|
112
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
113
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
114
|
+
/** @deprecated */
|
115
|
+
subscribe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
116
|
+
private subscribeInternal;
|
117
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
118
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
119
|
+
/** @deprecated */
|
120
|
+
subscribeNext<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
97
121
|
unsubscribe<K extends ArrayOr<keyof E>>(events: K, handler: keyof H | Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): boolean;
|
98
122
|
waitFor<K extends ArrayOr<keyof E>>(events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
99
123
|
race<K extends ArrayOr<keyof E>>(raceWith: number | Promise<any>, events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|