@rbxts/planck 0.2.2 → 0.2.4
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/out/conditions.d.ts +1 -1
- package/out/types.d.ts +9 -9
- package/package.json +1 -1
package/out/conditions.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const timePassed: (time: number) => Condition;
|
|
|
7
7
|
declare const exported: {
|
|
8
8
|
timePassed: (time: number) => Condition;
|
|
9
9
|
runOnce: () => Condition;
|
|
10
|
-
onEvent: <T extends unknown[]>(instance: EventInstance
|
|
10
|
+
onEvent: <T extends unknown[]>(instance: EventInstance<T>, event?: string) => LuaTuple<[Condition, () => IterableFunction<T>, () => void]>;
|
|
11
11
|
isNot: (condition: Condition) => Condition;
|
|
12
12
|
cleanupCondition: (condition: Condition) => void
|
|
13
13
|
}
|
package/out/types.d.ts
CHANGED
|
@@ -77,17 +77,17 @@ export interface SystemTable<T extends unknown[]> {
|
|
|
77
77
|
|
|
78
78
|
export type System<T extends unknown[]> = SystemFn<T> | SystemTable<T>;
|
|
79
79
|
|
|
80
|
-
export type EventLike = {
|
|
81
|
-
connect(callback: (...args:
|
|
80
|
+
export type EventLike<T extends unknown[] = unknown[]> = {
|
|
81
|
+
connect(callback: (...args: T) => void): void;
|
|
82
82
|
} | {
|
|
83
|
-
Connect(callback: (...args:
|
|
83
|
+
Connect(callback: (...args: T) => void): void;
|
|
84
84
|
} | {
|
|
85
|
-
on(callback: (...args:
|
|
85
|
+
on(callback: (...args: T) => void): void;
|
|
86
86
|
} | {
|
|
87
|
-
On(callback: (...args:
|
|
87
|
+
On(callback: (...args: T) => void): void;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export type EventInstance = Instance | EventLike | RBXScriptSignal;
|
|
90
|
+
export type EventInstance<T extends unknown[] = unknown[]> = Instance | EventLike<T> | RBXScriptSignal;
|
|
91
91
|
export type Disconnectable = RBXScriptConnection | { Disconnect(): void } | { disconnect(): void } | { Destroy(): void } | { destroy(): void; }
|
|
92
92
|
export type ConnectFn = (callback: (...args: unknown[]) => void) => Disconnectable;
|
|
93
93
|
|
|
@@ -97,9 +97,9 @@ export interface Utils {
|
|
|
97
97
|
getSystemName: <T extends unknown[]>(system: SystemFn<T>) => string
|
|
98
98
|
isPhase: (phase: Phase) => Phase | undefined
|
|
99
99
|
isPipeline: (pipeline: Pipeline) => Pipeline | undefined
|
|
100
|
-
getEventIdentifier: (instance: EventInstance
|
|
101
|
-
isValidEvent: (instance: EventInstance
|
|
102
|
-
getConnectedFunction: (instance: EventInstance
|
|
100
|
+
getEventIdentifier: <T extends unknown[]>(instance: EventInstance<T>, event?: string) => string
|
|
101
|
+
isValidEvent: <T extends unknown[]>(instance: EventInstance<T>, event?: string) => boolean
|
|
102
|
+
getConnectedFunction: <T extends unknown[]>(instance: EventInstance<T>, event?: string) => ConnectFn | undefined
|
|
103
103
|
disconnectEvent: (disconectable: Disconnectable) => void
|
|
104
104
|
}
|
|
105
105
|
|