@wayward/types 2.14.4-beta.dev.20250103.1 → 2.14.4-beta.dev.20250105.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.
@@ -53,5 +53,5 @@ export default class ReferenceManager {
53
53
  private resolveInternal;
54
54
  inspect<REFTYPE extends ReferenceType>(reference: Reference<REFTYPE>, context?: InfoProviderContext): Inspection<any> | undefined;
55
55
  inspect(reference: Reference, context?: InfoProviderContext): Inspection<any> | undefined;
56
- tooltip(reference: Reference, initializer?: (tooltip: Tooltip, handler: ReferenceTooltipHandler) => any, context?: InfoProviderContext): (tooltip: Tooltip) => Promise<void>;
56
+ tooltip(reference: Reference, initializer?: (tooltip: Tooltip, handler: ReferenceTooltipHandler) => any, context?: InfoProviderContext): (tooltip: Tooltip) => Promise<boolean>;
57
57
  }
@@ -55,8 +55,8 @@ declare enum Message {
55
55
  ActionDetachContainerDetachContainer = 43,
56
56
  ActionDetachContainerNoDetach = 44,
57
57
  ActionDigTooDeep = 45,
58
- ActionDigWaterTooDeep = 46,
59
- ActionDigWaterFilledHole = 47,
58
+ ActionDigWaterFilledHole = 46,
59
+ ActionDigWaterTooDeep = 47,
60
60
  ActionDisassembleNoItemsSalvaged = 48,
61
61
  ActionDisassembleSalvaged = 49,
62
62
  ActionDismantleSeparated = 50,
@@ -586,164 +586,164 @@ declare enum Message {
586
586
  Prepare = 574,
587
587
  Prepared = 575,
588
588
  PreservedFood = 576,
589
- PurifiedWaterInStill = 577,
590
- RandomEventsFire = 578,
591
- ReduceLength = 579,
592
- RefusedToBeTamed = 580,
593
- Repair = 581,
594
- RequiredForDisassembly = 582,
595
- RequiresFireToBeLit = 583,
596
- RequiresYouToBeAround = 584,
597
- Resistant = 585,
598
- Rest = 586,
599
- Rested = 587,
600
- Resting = 588,
601
- RestingOnGroundNotEffective = 589,
602
- RestInterrupted = 590,
603
- RestInterruptedDamage = 591,
604
- RestInterruptedDying = 592,
605
- RestInterruptedLoudNoise = 593,
606
- RestInterruptedPain = 594,
607
- RestInterruptedStirring = 595,
608
- RestInterruptedWaterPoured = 596,
609
- RestLongTime = 597,
610
- RestModerateTime = 598,
611
- RestOnBoat = 599,
612
- RestShortTime = 600,
613
- RestTime = 601,
614
- ReturnedToCivilization = 602,
615
- ReturningToCivilizationSetOffAgain = 603,
616
- ReturnsToLife = 604,
617
- Reverse = 605,
618
- Sailing = 606,
619
- ScrollMaster = 607,
620
- ScrollProvidedNoUsefulInsight = 608,
621
- Seawater = 609,
622
- SeemsToHaveDrawnEnergy = 610,
623
- SetTrapOffButNoDamage = 611,
624
- SetUp = 612,
625
- ShadowInTheWater = 613,
626
- SkillHasRaised = 614,
627
- Skills = 615,
628
- Sleep = 616,
629
- Sleeping = 617,
630
- SleepOnBoat = 618,
631
- Slept = 619,
632
- SlitherSuckerConstricts = 620,
633
- SlitherSuckerFailedToRemove = 621,
634
- SlitherSuckerFailedToRemoveOuch = 622,
635
- SlitherSuckerJumpedOnHead = 623,
636
- SolarStill = 624,
637
- SomethingInTheWayOf = 625,
638
- SomethingInTheWayOfButcherFirst = 626,
639
- SomethingInTheWayOfFire = 627,
640
- SomethingInTheWayOfFishing = 628,
641
- SomethingInTheWayOfPerforming = 629,
642
- SomethingInTheWayOfPlacing = 630,
643
- SomethingInTheWayOfReleasing = 631,
644
- SomethingInTheWayOfSummoning = 632,
645
- SomethingInWayOfClosingDoor = 633,
646
- SoothedTheirBurnInjuries = 634,
647
- SoothedYourBurnInjuries = 635,
648
- SortedByCategory = 636,
649
- SortedByCraftableOnly = 637,
650
- SortedByName = 638,
651
- SortedBySkill = 639,
652
- SortedByUnlockedTime = 640,
653
- StaminaIsFull = 641,
654
- StartedFire = 642,
655
- StartTravelInWater = 643,
656
- StarvingToDeath = 644,
657
- StatAmount = 645,
658
- StatChangeUnknown = 646,
659
- StatGained = 647,
660
- StatIncreasing = 648,
661
- StatLost = 649,
662
- StatQuenched = 650,
663
- StatRegained = 651,
664
- StatSated = 652,
665
- SteppingOn = 653,
666
- Still = 654,
667
- StillHasNoWaterToPurify = 655,
668
- StirredUpClawWorm = 656,
669
- StirredUpCreature = 657,
670
- StoppedYourBleeding = 658,
671
- StopUsingVehicle = 659,
672
- SummonedGuardiansByDiggingTreasure = 660,
673
- SummonedGuardiansByLockpicking = 661,
674
- SummonVoidDwellerItem = 662,
675
- SummonVoidDwellerRinging = 663,
676
- SummonVoidDwellerShiver = 664,
677
- SunNotBrightEnoughToStartFire = 665,
678
- SwampWater = 666,
679
- Swimming = 667,
680
- TakenFromGroundBecomeTamed = 668,
681
- TeleportBlocked = 669,
682
- Teleported = 670,
683
- TheirFist = 671,
684
- TheirInventory = 672,
685
- ThePlant = 673,
686
- ThereIsNoContainerOnTheStill = 674,
687
- ThereIsNoSunToStartFire = 675,
688
- ThisCannotBeMilked = 676,
689
- Throw = 677,
690
- ThrownIntoDepths = 678,
691
- ThrownIntoObstacle = 679,
692
- ThrownIntoVoid = 680,
693
- TierGroup = 681,
694
- Till = 682,
695
- Tilling = 683,
696
- TimeIs = 684,
697
- TimeIsDawn = 685,
698
- TimeIsDaytime = 686,
699
- TimeIsDusk = 687,
700
- TimeIsNighttime = 688,
701
- TimeIsSunrise = 689,
702
- TimeIsSunset = 690,
703
- ToFight = 691,
704
- TooDamaged = 692,
705
- TooExhaustedToJump = 693,
706
- Touching = 694,
707
- TrampledFire = 695,
708
- TrampledFireFail = 696,
709
- TrampledFirePartial = 697,
710
- TrampledIntoGround = 698,
711
- TrampleIntoGround = 699,
712
- Trampling = 700,
713
- TransmogrificationNotPossible = 701,
714
- Transmogrified = 702,
715
- TrapMissed = 703,
716
- TrapStoppedYou = 704,
717
- Traveling = 705,
718
- Treasure = 706,
719
- TreasureIsBlocked = 707,
720
- UiActionCannotUseInaccessibleItem = 708,
721
- UiActionCannotUseInThisSituation = 709,
722
- UiActionCannotUseNoItemHovered = 710,
723
- UiActionCannotUseNotInRange = 711,
724
- UiActionCannotUseOnThisIsland = 712,
725
- UiActionCannotUseRequiresCreature = 713,
726
- UiActionCannotUseRequiresDoodad = 714,
727
- UiActionCannotUseRequiresItem = 715,
728
- UiActionCannotUseRequiresNPC = 716,
729
- UiActionCannotUseRequiresVehicle = 717,
730
- UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue1 = 718,
731
- UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue2 = 719,
732
- UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue3 = 720,
733
- UiDialogTradeIndicateTradeAlreadyTradedSellDialogue1 = 721,
734
- UiDialogTradeIndicateTradeAlreadyTradedSellDialogue2 = 722,
735
- UiDialogTradeIndicateTradeAlreadyTradedSellDialogue3 = 723,
736
- UiDialogTradeIndicateTradeTooMuchTradesDialogue1 = 724,
737
- UiDialogTradeIndicateTradeTooMuchTradesDialogue2 = 725,
738
- UiDialogTradeIndicateTradeTooMuchTradesDialogue3 = 726,
739
- UnhitchCreature = 727,
740
- Unknown = 728,
741
- Unlimited = 729,
742
- UnlockedChest = 730,
743
- UnpurifiedFreshWater = 731,
744
- UnpurifiedWaterInStill = 732,
745
- UnpurifiedWaterInTop = 733,
746
- PurifiedWaterInBottom = 734,
589
+ PurifiedWaterInBottom = 577,
590
+ PurifiedWaterInStill = 578,
591
+ RandomEventsFire = 579,
592
+ ReduceLength = 580,
593
+ RefusedToBeTamed = 581,
594
+ Repair = 582,
595
+ RequiredForDisassembly = 583,
596
+ RequiresFireToBeLit = 584,
597
+ RequiresYouToBeAround = 585,
598
+ Resistant = 586,
599
+ Rest = 587,
600
+ Rested = 588,
601
+ Resting = 589,
602
+ RestingOnGroundNotEffective = 590,
603
+ RestInterrupted = 591,
604
+ RestInterruptedDamage = 592,
605
+ RestInterruptedDying = 593,
606
+ RestInterruptedLoudNoise = 594,
607
+ RestInterruptedPain = 595,
608
+ RestInterruptedStirring = 596,
609
+ RestInterruptedWaterPoured = 597,
610
+ RestLongTime = 598,
611
+ RestModerateTime = 599,
612
+ RestOnBoat = 600,
613
+ RestShortTime = 601,
614
+ RestTime = 602,
615
+ ReturnedToCivilization = 603,
616
+ ReturningToCivilizationSetOffAgain = 604,
617
+ ReturnsToLife = 605,
618
+ Reverse = 606,
619
+ Sailing = 607,
620
+ ScrollMaster = 608,
621
+ ScrollProvidedNoUsefulInsight = 609,
622
+ Seawater = 610,
623
+ SeemsToHaveDrawnEnergy = 611,
624
+ SetTrapOffButNoDamage = 612,
625
+ SetUp = 613,
626
+ ShadowInTheWater = 614,
627
+ SkillHasRaised = 615,
628
+ Skills = 616,
629
+ Sleep = 617,
630
+ Sleeping = 618,
631
+ SleepOnBoat = 619,
632
+ Slept = 620,
633
+ SlitherSuckerConstricts = 621,
634
+ SlitherSuckerFailedToRemove = 622,
635
+ SlitherSuckerFailedToRemoveOuch = 623,
636
+ SlitherSuckerJumpedOnHead = 624,
637
+ SolarStill = 625,
638
+ SomethingInTheWayOf = 626,
639
+ SomethingInTheWayOfButcherFirst = 627,
640
+ SomethingInTheWayOfFire = 628,
641
+ SomethingInTheWayOfFishing = 629,
642
+ SomethingInTheWayOfPerforming = 630,
643
+ SomethingInTheWayOfPlacing = 631,
644
+ SomethingInTheWayOfReleasing = 632,
645
+ SomethingInTheWayOfSummoning = 633,
646
+ SomethingInWayOfClosingDoor = 634,
647
+ SoothedTheirBurnInjuries = 635,
648
+ SoothedYourBurnInjuries = 636,
649
+ SortedByCategory = 637,
650
+ SortedByCraftableOnly = 638,
651
+ SortedByName = 639,
652
+ SortedBySkill = 640,
653
+ SortedByUnlockedTime = 641,
654
+ StaminaIsFull = 642,
655
+ StartedFire = 643,
656
+ StartTravelInWater = 644,
657
+ StarvingToDeath = 645,
658
+ StatAmount = 646,
659
+ StatChangeUnknown = 647,
660
+ StatGained = 648,
661
+ StatIncreasing = 649,
662
+ StatLost = 650,
663
+ StatQuenched = 651,
664
+ StatRegained = 652,
665
+ StatSated = 653,
666
+ SteppingOn = 654,
667
+ Still = 655,
668
+ StillHasNoWaterToPurify = 656,
669
+ StirredUpClawWorm = 657,
670
+ StirredUpCreature = 658,
671
+ StoppedYourBleeding = 659,
672
+ StopUsingVehicle = 660,
673
+ SummonedGuardiansByDiggingTreasure = 661,
674
+ SummonedGuardiansByLockpicking = 662,
675
+ SummonVoidDwellerItem = 663,
676
+ SummonVoidDwellerRinging = 664,
677
+ SummonVoidDwellerShiver = 665,
678
+ SunNotBrightEnoughToStartFire = 666,
679
+ SwampWater = 667,
680
+ Swimming = 668,
681
+ TakenFromGroundBecomeTamed = 669,
682
+ TeleportBlocked = 670,
683
+ Teleported = 671,
684
+ TheirFist = 672,
685
+ TheirInventory = 673,
686
+ ThePlant = 674,
687
+ ThereIsNoContainerOnTheStill = 675,
688
+ ThereIsNoSunToStartFire = 676,
689
+ ThisCannotBeMilked = 677,
690
+ Throw = 678,
691
+ ThrownIntoDepths = 679,
692
+ ThrownIntoObstacle = 680,
693
+ ThrownIntoVoid = 681,
694
+ TierGroup = 682,
695
+ Till = 683,
696
+ Tilling = 684,
697
+ TimeIs = 685,
698
+ TimeIsDawn = 686,
699
+ TimeIsDaytime = 687,
700
+ TimeIsDusk = 688,
701
+ TimeIsNighttime = 689,
702
+ TimeIsSunrise = 690,
703
+ TimeIsSunset = 691,
704
+ ToFight = 692,
705
+ TooDamaged = 693,
706
+ TooExhaustedToJump = 694,
707
+ Touching = 695,
708
+ TrampledFire = 696,
709
+ TrampledFireFail = 697,
710
+ TrampledFirePartial = 698,
711
+ TrampledIntoGround = 699,
712
+ TrampleIntoGround = 700,
713
+ Trampling = 701,
714
+ TransmogrificationNotPossible = 702,
715
+ Transmogrified = 703,
716
+ TrapMissed = 704,
717
+ TrapStoppedYou = 705,
718
+ Traveling = 706,
719
+ Treasure = 707,
720
+ TreasureIsBlocked = 708,
721
+ UiActionCannotUseInaccessibleItem = 709,
722
+ UiActionCannotUseInThisSituation = 710,
723
+ UiActionCannotUseNoItemHovered = 711,
724
+ UiActionCannotUseNotInRange = 712,
725
+ UiActionCannotUseOnThisIsland = 713,
726
+ UiActionCannotUseRequiresCreature = 714,
727
+ UiActionCannotUseRequiresDoodad = 715,
728
+ UiActionCannotUseRequiresItem = 716,
729
+ UiActionCannotUseRequiresNPC = 717,
730
+ UiActionCannotUseRequiresVehicle = 718,
731
+ UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue1 = 719,
732
+ UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue2 = 720,
733
+ UiDialogTradeIndicateTradeAlreadyTradedBuyDialogue3 = 721,
734
+ UiDialogTradeIndicateTradeAlreadyTradedSellDialogue1 = 722,
735
+ UiDialogTradeIndicateTradeAlreadyTradedSellDialogue2 = 723,
736
+ UiDialogTradeIndicateTradeAlreadyTradedSellDialogue3 = 724,
737
+ UiDialogTradeIndicateTradeTooMuchTradesDialogue1 = 725,
738
+ UiDialogTradeIndicateTradeTooMuchTradesDialogue2 = 726,
739
+ UiDialogTradeIndicateTradeTooMuchTradesDialogue3 = 727,
740
+ UnhitchCreature = 728,
741
+ Unknown = 729,
742
+ Unlimited = 730,
743
+ UnlockedChest = 731,
744
+ UnpurifiedFreshWater = 732,
745
+ UnpurifiedWaterInStill = 733,
746
+ UnpurifiedWaterInTop = 734,
747
747
  Use = 735,
748
748
  UsingBareHands = 736,
749
749
  VehicleDefense = 737,
@@ -20,7 +20,7 @@ export default class IslandDropdown<OTHER_OPTIONS extends string = never> extend
20
20
  protected getTranslation(islandId: IslandId): TranslationImpl;
21
21
  protected sortEnumOptions(o1: IDropdownSortableOption<string>, o2: IDropdownSortableOption<string>): number;
22
22
  protected getGroupName(biome: BiomeType): string;
23
- protected optionTooltipInitializer: (tooltip: Tooltip, option: string) => Promise<void> | undefined;
23
+ protected optionTooltipInitializer: (tooltip: Tooltip, option: string) => Promise<boolean> | undefined;
24
24
  protected shouldIncludeOtherOptionsInGroupFilter(): boolean;
25
25
  protected isInGroup(islandId: IslandId, biome: BiomeType): boolean;
26
26
  protected getGroups(): BiomeType[];
@@ -74,6 +74,7 @@ export declare class GlobalMouseInfo extends EventEmitter.Host<IGlobalMouseInfoE
74
74
  * @param recalcTarget Whether to recalculate the target before this operation. Defaults to `false`
75
75
  */
76
76
  isTarget<W extends Component | Element | string | undefined>(what?: W, recalcTarget?: boolean): (W extends Component ? W : HTMLElement) | undefined;
77
+ clearTarget(target?: Element): void;
77
78
  private _updateTarget;
78
79
  }
79
80
  interface IInputInfoEvents {
@@ -28,7 +28,11 @@ export interface IInspectionsTooltipHandlerEvents<INSPECTIONS_LIST extends Inspe
28
28
  export default abstract class InspectionsTooltipHandler<INSPECTIONS_LIST extends InspectionsList, TOOLTIP_ARGS extends any[] = []> extends EventEmitter.Host<IInspectionsTooltipHandlerEvents<INSPECTIONS_LIST, TOOLTIP_ARGS>> {
29
29
  protected current: IInspectionsTooltipHandlerCurrent<INSPECTIONS_LIST, TOOLTIP_ARGS> | undefined;
30
30
  private lastMousePosition?;
31
- initializeTooltip(tooltip: Tooltip, ...args: TOOLTIP_ARGS): Promise<void>;
31
+ /**
32
+ * Initializes tooltips
33
+ * @returns True if the tooltip was initialized. False if it was removed or replaced before so.
34
+ */
35
+ initializeTooltip(tooltip: Tooltip, ...args: TOOLTIP_ARGS): Promise<boolean>;
32
36
  remove(tooltip?: IInspectionsTooltipHandlerCurrent<INSPECTIONS_LIST, TOOLTIP_ARGS> | undefined): void;
33
37
  onInitInspections(handler: (inspections: INSPECTIONS_LIST) => any): void;
34
38
  protected abstract initializeInspections(...args: TOOLTIP_ARGS): INSPECTIONS_LIST | undefined;
@@ -21,7 +21,7 @@ export default class ReferenceTooltipHandler extends InspectionsTooltipHandler<R
21
21
  private readonly reference;
22
22
  private readonly initializer?;
23
23
  constructor(context: InfoProviderContext, reference: Reference, initializer?: ((tooltip: Tooltip, handler: ReferenceTooltipHandler) => any) | undefined);
24
- initializeTooltip(tooltip: Tooltip): Promise<void>;
24
+ initializeTooltip(tooltip: Tooltip): Promise<boolean>;
25
25
  protected initializeInspections(): ReferenceInspectionsList;
26
26
  protected initializeHints(hints: InspectionTooltipHints): void;
27
27
  }
@@ -24,7 +24,7 @@ export declare enum EquipmentSlotTooltipClasses {
24
24
  Hints = "game-dialog-equipment-slot-tooltip-hints"
25
25
  }
26
26
  export default class EquipmentSlotTooltipHandler extends InspectionsTooltipHandler<EquipmentSlotInspectionsList, [slot: EquipType]> {
27
- initializeTooltip(tooltip: Tooltip, slot: EquipType): Promise<void>;
27
+ initializeTooltip(tooltip: Tooltip, slot: EquipType): Promise<boolean>;
28
28
  protected initializeInspections(slot: EquipType): EquipmentSlotInspectionsList;
29
29
  protected initializeHints(hints: InspectionTooltipHints, slot: EquipType): void;
30
30
  private onSlotChanged;
@@ -43,9 +43,9 @@ export default class Tooltip extends Component {
43
43
  private forceShown;
44
44
  private maxWidth;
45
45
  private hasSetPosition;
46
- initialized?: Promise<any>;
46
+ initialized?: Promise<boolean>;
47
47
  context?: InfoProviderContext;
48
- constructor(source: Component | HTMLElement, initialize?: (tooltip: Tooltip) => any);
48
+ constructor(source: Component | HTMLElement, initialize?: (tooltip: Tooltip) => Promise<boolean>);
49
49
  protected onRemove(): void;
50
50
  setSecondary(): this;
51
51
  setForceShown(forceShown?: boolean): this;
@@ -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 type Component from "@wayward/game/ui/component/Component";
11
12
  export type Until<T> = Record<string, (...args: any[]) => T>;
12
13
  export type UntilHandler<T, U extends Until<T>> = {
13
14
  [key in keyof U]: {
@@ -16,7 +17,7 @@ export type UntilHandler<T, U extends Until<T>> = {
16
17
  };
17
18
  };
18
19
  type EmptyIfUndefined<T> = T extends undefined ? Empty : T;
19
- export declare abstract class Manipulator<T, U extends Until<T> | undefined = undefined> {
20
+ export declare abstract class Manipulator<T extends Component, U extends Until<T> | undefined = undefined> {
20
21
  protected readonly element: () => HTMLElement;
21
22
  protected readonly host: T;
22
23
  protected getUntilHandler?(): UntilHandler<T, EmptyIfUndefined<U>>;
@@ -32,7 +33,7 @@ export interface ClassUntil<T> extends Until<T> {
32
33
  remove(...classes: string[]): T;
33
34
  toggle(hasClass: boolean, ...classes: string[]): T;
34
35
  }
35
- export declare class ClassManipulator<T> extends Manipulator<T, ClassUntil<T>> {
36
+ export declare class ClassManipulator<T extends Component> extends Manipulator<T, ClassUntil<T>> {
36
37
  protected getUntilHandler(): {
37
38
  add: {
38
39
  start: (...classes: string[]) => T;
@@ -68,7 +69,7 @@ export interface AttributeUntil<T> extends Until<T> {
68
69
  set(attribute: string, value: string): T;
69
70
  set(attributes: Iterable<[string, string | null]>): T;
70
71
  }
71
- export declare class AttributeManipulator<T> extends Manipulator<T, AttributeUntil<T>> {
72
+ export declare class AttributeManipulator<T extends Component> extends Manipulator<T, AttributeUntil<T>> {
72
73
  protected getUntilHandler(): {
73
74
  set: any;
74
75
  };
@@ -80,7 +81,7 @@ export declare class AttributeManipulator<T> extends Manipulator<T, AttributeUnt
80
81
  has(...attributes: string[]): boolean;
81
82
  private getAttributeIterator;
82
83
  }
83
- export declare class DataManipulator<T> extends Manipulator<T> {
84
+ export declare class DataManipulator<T extends Component> extends Manipulator<T> {
84
85
  set(name: string, value: string): T;
85
86
  set(data: Iterable<[string, string | undefined]>): T;
86
87
  get(name: string): string;
@@ -92,7 +93,7 @@ export declare class DataManipulator<T> extends Manipulator<T> {
92
93
  export interface StyleUntil<T> extends Until<T> {
93
94
  set(rule: string, value: string): T;
94
95
  }
95
- export declare class StyleManipulator<T> extends Manipulator<T, StyleUntil<T>> {
96
+ export declare class StyleManipulator<T extends Component> extends Manipulator<T, StyleUntil<T>> {
96
97
  protected getUntilHandler(): {
97
98
  set: {
98
99
  start: (rule: string, value: string | number) => T;
@@ -16,11 +16,17 @@ declare class MemoryLeakDetector {
16
16
  private objectsCollected;
17
17
  private readonly objects;
18
18
  private activeTask;
19
+ private queuedGarbageCollectionTimeoutId;
19
20
  get isReportingErrors(): boolean;
20
21
  get isMonitoring(): boolean;
21
22
  getCount(prefix: string): number;
23
+ /**
24
+ * Queues a garbage collection to run after a delay
25
+ * @param delay Delay in milliseconds
26
+ */
27
+ queueNextGarbageCollection(delay?: number): void;
22
28
  waitForIdle(): Promise<void>;
23
- register(object: object, objectName: string, expectedLifetime: ExpectedLifetime, parentObjectIdentifier?: string): void;
29
+ register(object: object, objectName: string, expectedLifetime: ExpectedLifetime, parentObjectIdentifier?: string, includeStackTrace?: boolean): void;
24
30
  registerMultiple<T extends object>(prefix: string, objects: SaferArray<T>, objectNamer: (object: T) => string, expectedLifetime: ExpectedLifetime): void;
25
31
  onStopPlay(): void;
26
32
  onScreenShow(_: any, screen: Screen): Promise<any>;
@@ -111,7 +111,10 @@ declare class EventEmitter<H, E> {
111
111
  * Closes an event emitter, which will prevent any further subscriptions from being made.
112
112
  */
113
113
  close(): void;
114
- private throwIfClosed;
114
+ /**
115
+ * @returns True if closed
116
+ */
117
+ private throwErrorIfClosed;
115
118
  raw(): IEventEmitter<H, E>;
116
119
  emitSelf<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
117
120
  emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
@@ -16,5 +16,9 @@ export declare enum ExpectedLifetime {
16
16
  /**
17
17
  * should only exist while playing the game
18
18
  */
19
- WhilePlaying = 1
19
+ WhilePlaying = 1,
20
+ /**
21
+ * The object is expected to last until the next garbage collection system
22
+ */
23
+ UntilNextGarbageCollection = 2
20
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.14.4-beta.dev.20250103.1",
4
+ "version": "2.14.4-beta.dev.20250105.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",