@plugify-plugins/s2sdk-types 1.3.7 → 1.3.8

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.
Files changed (2) hide show
  1. package/index.d.ts +28 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -553,6 +553,32 @@ declare module ":s2sdk" {
553
553
  Quaternion = 19
554
554
  }
555
555
 
556
+ /**
557
+ * @description Enum representing the type of callback.
558
+ */
559
+ export enum EventHookError {
560
+
561
+ /**
562
+ * @description Indicates that the event hook was successfully created.
563
+ * */
564
+ Okay = 0,
565
+
566
+ /**
567
+ * @description Indicates that the event name provided is invalid or does not exist.
568
+ * */
569
+ InvalidEvent = 1,
570
+
571
+ /**
572
+ * @description Indicates that the event system is not currently active or initialized.
573
+ * */
574
+ NotActive = 2,
575
+
576
+ /**
577
+ * @description Indicates that the callback function provided is invalid or not compatible with the event system.
578
+ * */
579
+ InvalidCallback = 3
580
+ }
581
+
556
582
  /**
557
583
  * @description Enum representing the possible verbosity of a logger.
558
584
  */
@@ -4090,7 +4116,7 @@ declare module ":s2sdk" {
4090
4116
  * @param callback The callback function to call when the event is fired.
4091
4117
  * @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
4092
4118
  */
4093
- export function HookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): number;
4119
+ export function HookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): EventHookError;
4094
4120
 
4095
4121
  /**
4096
4122
  * @description Removes a hook for when a game event is fired.
@@ -4101,7 +4127,7 @@ declare module ":s2sdk" {
4101
4127
  * @param callback The callback function to remove.
4102
4128
  * @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
4103
4129
  */
4104
- export function UnhookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): number;
4130
+ export function UnhookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): EventHookError;
4105
4131
 
4106
4132
  /**
4107
4133
  * @description Creates a game event to be fired later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugify-plugins/s2sdk-types",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "generated typescript types to write plugins on plugify",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {},