@rbxts/axis 0.2.3-v.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/index.d.ts +5 -5
- package/package.json +1 -1
- package/README.md +0 -3
package/out/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export namespace Axis {
|
|
|
9
9
|
* @within Axis
|
|
10
10
|
* @type Map<T> { [Enum | string]: T } & { Enum.KeyCode | Enum.UserInputType }
|
|
11
11
|
*/
|
|
12
|
-
type _Map = Map<
|
|
12
|
+
type _Map<T> = Map<Enum | string, T> & Array<Enum.KeyCode | Enum.UserInputType>;
|
|
13
13
|
|
|
14
14
|
interface Input<T> {
|
|
15
15
|
read: (controller?: number) => LuaTuple<[T, T]>;
|
|
@@ -19,7 +19,7 @@ export namespace Axis {
|
|
|
19
19
|
changed: (controller?: number) => boolean;
|
|
20
20
|
hold: (value: T, controller?: number) => void;
|
|
21
21
|
move: (value: T, controller?: number) => void;
|
|
22
|
-
map: (keyMap: _Map) => void;
|
|
22
|
+
map: (keyMap: _Map<T>) => void;
|
|
23
23
|
update: () => void;
|
|
24
24
|
|
|
25
25
|
deadzone?: number;
|
|
@@ -29,11 +29,11 @@ export namespace Axis {
|
|
|
29
29
|
active: Array<Map<defined, T>>;
|
|
30
30
|
resets: Map<defined, defined>;
|
|
31
31
|
connections: RBXScriptConnection[];
|
|
32
|
-
keyMap: _Map
|
|
32
|
+
keyMap: _Map<T>;
|
|
33
33
|
inputMap: Map<Enum.KeyCode | Enum.UserInputType, T>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
type InputConstructor = <T>(input: _Map | (_Map & { deadzone?: number })) => Input<T>;
|
|
36
|
+
type InputConstructor = <T>(input: _Map<T> | (_Map<T> & { deadzone?: number })) => Input<T>;
|
|
37
37
|
|
|
38
38
|
interface Axis {
|
|
39
39
|
device: (inputType: Enum.UserInputType | undefined) => DeviceType;
|
|
@@ -41,7 +41,7 @@ export namespace Axis {
|
|
|
41
41
|
input: InputConstructor;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function input<T>(inputMap: (_Map & { deadzone?: number }) | _Map): Input<T>;
|
|
44
|
+
function input<T>(inputMap: (_Map<T> & { deadzone?: number }) | _Map<T>): Input<T>;
|
|
45
45
|
|
|
46
46
|
function update(inputs: Map<defined, Input<defined>>): void;
|
|
47
47
|
|
package/package.json
CHANGED
package/README.md
DELETED