@rbxts/planck 0.2.1 → 0.2.3
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/Scheduler.d.ts +1 -1
- package/out/conditions.d.ts +1 -1
- package/out/types.d.ts +12 -9
- package/package.json +1 -1
package/out/Scheduler.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare class Scheduler<T extends unknown[]> {
|
|
|
17
17
|
insertBefore(dependent: Pipeline, before: Phase): Scheduler<T>
|
|
18
18
|
insertAfter(phase: Phase, after: Phase | Pipeline): Scheduler<T>
|
|
19
19
|
insertAfter(pipeline: Pipeline, after: Phase | Pipeline): Scheduler<T>
|
|
20
|
-
insert(dependent: Phase | Pipeline, instance: EventInstance
|
|
20
|
+
insert(dependent: Phase | Pipeline, instance: EventInstance, event?: string): Scheduler<T>
|
|
21
21
|
insert(dependent: Phase | Pipeline): Scheduler<T>
|
|
22
22
|
runAll(): Scheduler<T>
|
|
23
23
|
run(dependent: System<T> | Phase | Pipeline): Scheduler<T>
|
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,14 +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
|
|
81
|
-
connect(callback: (...args:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
export type EventLike<T extends unknown[] = unknown[]> = {
|
|
81
|
+
connect(callback: (...args: T) => void): void;
|
|
82
|
+
} | {
|
|
83
|
+
Connect(callback: (...args: T) => void): void;
|
|
84
|
+
} | {
|
|
85
|
+
on(callback: (...args: T) => void): void;
|
|
86
|
+
} | {
|
|
87
|
+
On(callback: (...args: T) => void): void;
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
export type EventInstance = Instance | EventLike | RBXScriptSignal;
|
|
90
|
+
export type EventInstance<T extends unknown[] = unknown[]> = Instance | EventLike<T> | RBXScriptSignal;
|
|
88
91
|
export type Disconnectable = RBXScriptConnection | { Disconnect(): void } | { disconnect(): void } | { Destroy(): void } | { destroy(): void; }
|
|
89
92
|
export type ConnectFn = (callback: (...args: unknown[]) => void) => Disconnectable;
|
|
90
93
|
|
|
@@ -94,9 +97,9 @@ export interface Utils {
|
|
|
94
97
|
getSystemName: <T extends unknown[]>(system: SystemFn<T>) => string
|
|
95
98
|
isPhase: (phase: Phase) => Phase | undefined
|
|
96
99
|
isPipeline: (pipeline: Pipeline) => Pipeline | undefined
|
|
97
|
-
getEventIdentifier: (instance: EventInstance
|
|
98
|
-
isValidEvent: (instance: EventInstance
|
|
99
|
-
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
|
|
100
103
|
disconnectEvent: (disconectable: Disconnectable) => void
|
|
101
104
|
}
|
|
102
105
|
|