@rbxts/planck 0.2.1 → 0.2.2

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.
@@ -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 | EventLike, event?: string | EventLike): Scheduler<T>
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>
@@ -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 | EventLike, event?: string | EventLike) => LuaTuple<[Condition, IterableFunction<T>, () => void]>;
10
+ onEvent: <T extends unknown[]>(instance: EventInstance | EventLike, 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,10 +77,13 @@ export interface SystemTable<T extends unknown[]> {
77
77
 
78
78
  export type System<T extends unknown[]> = SystemFn<T> | SystemTable<T>;
79
79
 
80
- export interface EventLike {
80
+ export type EventLike = {
81
81
  connect(callback: (...args: unknown[]) => void): void;
82
+ } | {
82
83
  Connect(callback: (...args: unknown[]) => void): void;
84
+ } | {
83
85
  on(callback: (...args: unknown[]) => void): void;
86
+ } | {
84
87
  On(callback: (...args: unknown[]) => void): void;
85
88
  }
86
89
 
@@ -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, event?: EventLike) => string
98
- isValidEvent: (instance: EventInstance, event: EventLike) => boolean
99
- getConnectedFunction: (instance: EventInstance | EventLike, event: string | EventLike) => ConnectFn | undefined
100
+ getEventIdentifier: (instance: EventInstance, event?: string) => string
101
+ isValidEvent: (instance: EventInstance, event?: string) => boolean
102
+ getConnectedFunction: (instance: EventInstance, event?: string) => ConnectFn | undefined
100
103
  disconnectEvent: (disconectable: Disconnectable) => void
101
104
  }
102
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/planck",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "An agnostic scheduler for ECS",
5
5
  "main": "out/init.lua",
6
6
  "repository": {