@citizenfx/client 2.0.5057-1 → 2.0.5061-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.
Files changed (2) hide show
  1. package/index.d.ts +19 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -70,6 +70,16 @@ interface CitizenInterface {
70
70
  makeRefFunction(refFunction: Function): string
71
71
  }
72
72
 
73
+ interface CitizenTimer {
74
+ ref(): void,
75
+ unref(): void,
76
+ hasRef(): boolean,
77
+ refresh(): void,
78
+ [Symbol.toPrimitive](): number,
79
+ };
80
+
81
+ type CitizenImmediate = Omit<CitizenTimer, 'refresh'>;
82
+
73
83
  declare var Citizen: CitizenInterface;
74
84
 
75
85
  declare function addRawEventListener(eventName: string, callback: Function): void
@@ -100,6 +110,15 @@ declare function TriggerLatentClientEvent(eventName: string, target: number|stri
100
110
 
101
111
  declare function removeEventListener(eventName: string, callback: Function): void
102
112
 
113
+ declare function setTimeout<T extends any[]>(callback: (...args: T) => void, ms?: number, ...args: T): CitizenTimer;
114
+ declare function clearTimeout(timeout: CitizenTimer): void;
115
+
116
+ declare function setInterval<T extends any[]>(callback: (...args: T) => void, ms?: number, ...args: T): CitizenTimer;
117
+ declare function clearInterval(interval: CitizenTimer): void;
118
+
119
+ declare function setImmediate<T extends any[]>(callback: (...args: T) => void, ...args: T): CitizenImmediate;
120
+ declare function clearImmediate(immediate: CitizenImmediate): void;
121
+
103
122
  declare function setTick(callback: Function): number
104
123
  declare function clearTick(callback: number): void
105
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenfx/client",
3
- "version": "2.0.5057-1",
3
+ "version": "2.0.5061-1",
4
4
  "description": "Typings for the CitizenFX client JS API.",
5
5
  "main": "index.js",
6
6
  "scripts": {