dualsense-ts 2.1.0 → 2.1.44

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/README.md CHANGED
@@ -32,24 +32,25 @@ const controller = new Dualsense();
32
32
 
33
33
  ```typescript
34
34
  // Buttons
35
- controller.circle.active; // false
36
- controller.cross.active; // true
37
- controller.left.bumper.active; // true
35
+ controller.circle.state; // false
36
+ controller.left.bumper.state; // true
38
37
 
39
38
  // Triggers
40
- controller.right.trigger.active; // true
41
- controller.right.trigger.pressure; // 0.72 (0 - 1)
39
+ controller.right.trigger.active; // true
40
+ controller.right.trigger.pressure; // 0.72, 0 - 1
42
41
 
43
- // Analog Sticks
44
- controller.left.analog.x.active; // true
45
- controller.left.analog.x.state; // 0.51, -1 to 1 like a unit circle
42
+ // Analog Sticks - represented as a position on a unit circle
43
+ controller.left.analog.x.active; // true, when away from center
44
+ controller.left.analog.x.state; // 0.51, -1 to 1
45
+ controller.left.analog.direction; // 4.32, radians
46
+ controller.left.analog.magnitude; // 0.23, 0 to 1
46
47
 
47
- // Touchpad
48
+ // Touchpad - each touch point works like an analog input
48
49
  controller.touchpad.right.contact.state; // false
49
- +controller.touchpad.right.x.state;; // -0.44, each touchpoint works like an analog input
50
+ +controller.touchpad.right.x; // -0.44, -1 to 1
50
51
  ```
51
52
 
52
- - _Callbacks_: Each input is an EventEmitter that provides `input` or `change` events
53
+ - _Callbacks_: Each input is an EventEmitter that provides `input`, `press`, `release`, and `change` events
53
54
 
54
55
  ```typescript
55
56
  // Change events are triggered only when an input's value changes
@@ -60,17 +61,18 @@ controller.triangle.on("change", (input) =>
60
61
  // ▲ changed: false
61
62
 
62
63
  // The callback provides two arguments, so you can monitor nested inputs
63
- controller.dpad.on("change", (dpad, input) =>
64
- assert(dpad === controller.dpad) // The input you subscribed to
65
- console.log(`${input} changed: ${input.active}`) // The input that actually changed
64
+ // You'll get a reference to your original input, and whichever one changed
65
+ controller.dpad.on("press", (dpad, input) =>
66
+ assert(dpad === controller.dpad)
67
+ console.log(`${input} pressed`)
66
68
  );
67
- // ↑ changed: true
68
- // → changed: true
69
- // ↑ changed: false
69
+ // ↑ pressed
70
+ // → pressed
71
+ // ↑ pressed
70
72
 
71
73
  // `input` events are triggered whenever there is new information from the controller
72
74
  // Your Dualsense may provide over 250 `input` events per second, so use this sparingly
73
- // These events are not available for nested inputs, like in the example above
75
+ // These events are not available for nested inputs, like the example above
74
76
  controller.left.analog.x.on("input", console.log)
75
77
  ```
76
78
 
@@ -81,7 +83,7 @@ controller.left.analog.x.on("input", console.log)
81
83
  const { active } = await controller.dpad.up.promise("release");
82
84
 
83
85
  // Wait for the next press of any dpad button
84
- const { left, up, down, right } = await controller.dpad.promise("pres");
86
+ const { left, up, down, right } = await controller.dpad.promise("press");
85
87
 
86
88
  // Wait for any input at all
87
89
  await controller.promise();
package/docs/Analog.md CHANGED
@@ -107,7 +107,7 @@ The joystick is abstracted to a unit circle.
107
107
 
108
108
  #### Defined in
109
109
 
110
- [src/elements/analog.ts:28](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L28)
110
+ [src/elements/analog.ts:28](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L28)
111
111
 
112
112
  ## Properties
113
113
 
@@ -136,7 +136,7 @@ The joystick is abstracted to a unit circle.
136
136
 
137
137
  #### Defined in
138
138
 
139
- [src/input.ts:128](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L128)
139
+ [src/input.ts:128](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L128)
140
140
 
141
141
  ___
142
142
 
@@ -150,7 +150,7 @@ ___
150
150
 
151
151
  #### Defined in
152
152
 
153
- [src/input.ts:162](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L162)
153
+ [src/input.ts:162](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L162)
154
154
 
155
155
  ___
156
156
 
@@ -164,7 +164,7 @@ ___
164
164
 
165
165
  #### Defined in
166
166
 
167
- [src/input.ts:157](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L157)
167
+ [src/input.ts:157](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L157)
168
168
 
169
169
  ___
170
170
 
@@ -178,7 +178,7 @@ ___
178
178
 
179
179
  #### Defined in
180
180
 
181
- [src/input.ts:154](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L154)
181
+ [src/input.ts:154](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L154)
182
182
 
183
183
  ___
184
184
 
@@ -192,7 +192,7 @@ ___
192
192
 
193
193
  #### Defined in
194
194
 
195
- [src/input.ts:160](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L160)
195
+ [src/input.ts:160](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L160)
196
196
 
197
197
  ___
198
198
 
@@ -202,7 +202,7 @@ ___
202
202
 
203
203
  #### Defined in
204
204
 
205
- [src/elements/analog.ts:26](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L26)
205
+ [src/elements/analog.ts:26](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L26)
206
206
 
207
207
  ___
208
208
 
@@ -216,7 +216,7 @@ ___
216
216
 
217
217
  #### Defined in
218
218
 
219
- [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L58)
219
+ [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L58)
220
220
 
221
221
  ___
222
222
 
@@ -230,7 +230,7 @@ ___
230
230
 
231
231
  #### Defined in
232
232
 
233
- [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L61)
233
+ [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L61)
234
234
 
235
235
  ___
236
236
 
@@ -244,7 +244,7 @@ ___
244
244
 
245
245
  #### Defined in
246
246
 
247
- [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L64)
247
+ [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L64)
248
248
 
249
249
  ___
250
250
 
@@ -258,7 +258,7 @@ ___
258
258
 
259
259
  #### Defined in
260
260
 
261
- [src/elements/analog.ts:22](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L22)
261
+ [src/elements/analog.ts:22](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L22)
262
262
 
263
263
  ___
264
264
 
@@ -272,7 +272,7 @@ ___
272
272
 
273
273
  #### Defined in
274
274
 
275
- [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L67)
275
+ [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L67)
276
276
 
277
277
  ___
278
278
 
@@ -282,7 +282,7 @@ ___
282
282
 
283
283
  #### Defined in
284
284
 
285
- [src/elements/analog.ts:24](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L24)
285
+ [src/elements/analog.ts:24](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L24)
286
286
 
287
287
  ___
288
288
 
@@ -292,7 +292,7 @@ ___
292
292
 
293
293
  #### Defined in
294
294
 
295
- [src/elements/analog.ts:25](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L25)
295
+ [src/elements/analog.ts:25](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L25)
296
296
 
297
297
  ___
298
298
 
@@ -306,7 +306,7 @@ ___
306
306
 
307
307
  #### Defined in
308
308
 
309
- node_modules/@types/node/events.d.ts:301
309
+ node_modules/@types/node/events.d.ts:291
310
310
 
311
311
  ___
312
312
 
@@ -322,7 +322,7 @@ Sets or gets the default captureRejection value for all emitters.
322
322
 
323
323
  #### Defined in
324
324
 
325
- node_modules/@types/node/events.d.ts:306
325
+ node_modules/@types/node/events.d.ts:296
326
326
 
327
327
  ___
328
328
 
@@ -336,7 +336,7 @@ ___
336
336
 
337
337
  #### Defined in
338
338
 
339
- node_modules/@types/node/events.d.ts:307
339
+ node_modules/@types/node/events.d.ts:297
340
340
 
341
341
  ___
342
342
 
@@ -358,7 +358,7 @@ regular `'error'` listener is installed.
358
358
 
359
359
  #### Defined in
360
360
 
361
- node_modules/@types/node/events.d.ts:300
361
+ node_modules/@types/node/events.d.ts:290
362
362
 
363
363
  ## Accessors
364
364
 
@@ -376,7 +376,7 @@ Input.\_\_@toStringTag@66
376
376
 
377
377
  #### Defined in
378
378
 
379
- [src/input.ts:149](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L149)
379
+ [src/input.ts:149](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L149)
380
380
 
381
381
  ___
382
382
 
@@ -394,7 +394,7 @@ Input.active
394
394
 
395
395
  #### Defined in
396
396
 
397
- [src/elements/analog.ts:43](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L43)
397
+ [src/elements/analog.ts:43](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L43)
398
398
 
399
399
  ___
400
400
 
@@ -408,7 +408,7 @@ ___
408
408
 
409
409
  #### Defined in
410
410
 
411
- [src/elements/analog.ts:68](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L68)
411
+ [src/elements/analog.ts:68](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L68)
412
412
 
413
413
  ___
414
414
 
@@ -422,7 +422,7 @@ ___
422
422
 
423
423
  #### Defined in
424
424
 
425
- [src/elements/analog.ts:83](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L83)
425
+ [src/elements/analog.ts:83](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L83)
426
426
 
427
427
  ___
428
428
 
@@ -436,7 +436,7 @@ ___
436
436
 
437
437
  #### Defined in
438
438
 
439
- [src/elements/analog.ts:78](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L78)
439
+ [src/elements/analog.ts:78](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L78)
440
440
 
441
441
  ___
442
442
 
@@ -450,7 +450,7 @@ ___
450
450
 
451
451
  #### Defined in
452
452
 
453
- [src/elements/analog.ts:58](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L58)
453
+ [src/elements/analog.ts:58](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L58)
454
454
 
455
455
  ___
456
456
 
@@ -464,7 +464,7 @@ ___
464
464
 
465
465
  #### Defined in
466
466
 
467
- [src/elements/analog.ts:73](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L73)
467
+ [src/elements/analog.ts:73](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L73)
468
468
 
469
469
  ___
470
470
 
@@ -478,7 +478,7 @@ ___
478
478
 
479
479
  #### Defined in
480
480
 
481
- [src/elements/analog.ts:53](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L53)
481
+ [src/elements/analog.ts:53](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L53)
482
482
 
483
483
  ___
484
484
 
@@ -492,7 +492,7 @@ ___
492
492
 
493
493
  #### Defined in
494
494
 
495
- [src/elements/analog.ts:63](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L63)
495
+ [src/elements/analog.ts:63](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L63)
496
496
 
497
497
  ___
498
498
 
@@ -511,7 +511,7 @@ ___
511
511
 
512
512
  #### Defined in
513
513
 
514
- [src/elements/analog.ts:48](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L48)
514
+ [src/elements/analog.ts:48](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L48)
515
515
 
516
516
  ## Methods
517
517
 
@@ -532,7 +532,7 @@ And decide if this is the root Input.
532
532
 
533
533
  #### Defined in
534
534
 
535
- [src/input.ts:168](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L168)
535
+ [src/input.ts:168](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L168)
536
536
 
537
537
  ___
538
538
 
@@ -557,7 +557,7 @@ ___
557
557
 
558
558
  #### Defined in
559
559
 
560
- [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L190)
560
+ [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L190)
561
561
 
562
562
  ___
563
563
 
@@ -582,7 +582,7 @@ ___
582
582
 
583
583
  #### Defined in
584
584
 
585
- [src/input.ts:194](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L194)
585
+ [src/input.ts:194](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L194)
586
586
 
587
587
  ___
588
588
 
@@ -600,7 +600,7 @@ ___
600
600
 
601
601
  #### Defined in
602
602
 
603
- [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L186)
603
+ [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L186)
604
604
 
605
605
  ___
606
606
 
@@ -631,7 +631,7 @@ ___
631
631
 
632
632
  #### Defined in
633
633
 
634
- [src/input.ts:199](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L199)
634
+ [src/input.ts:199](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L199)
635
635
 
636
636
  ___
637
637
 
@@ -657,7 +657,7 @@ Update the input's state and trigger all necessary callbacks.
657
657
 
658
658
  #### Defined in
659
659
 
660
- [src/input.ts:215](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L215)
660
+ [src/input.ts:215](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L215)
661
661
 
662
662
  ___
663
663
 
@@ -675,7 +675,7 @@ ___
675
675
 
676
676
  #### Defined in
677
677
 
678
- [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L139)
678
+ [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L139)
679
679
 
680
680
  ___
681
681
 
@@ -693,7 +693,7 @@ ___
693
693
 
694
694
  #### Defined in
695
695
 
696
- [src/input.ts:131](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L131)
696
+ [src/input.ts:131](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L131)
697
697
 
698
698
  ___
699
699
 
@@ -717,7 +717,7 @@ ___
717
717
 
718
718
  #### Defined in
719
719
 
720
- [src/input.ts:143](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L143)
720
+ [src/input.ts:143](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L143)
721
721
 
722
722
  ___
723
723
 
@@ -746,7 +746,7 @@ Alias for `emitter.on(eventName, listener)`.
746
746
 
747
747
  #### Defined in
748
748
 
749
- node_modules/@types/node/events.d.ts:327
749
+ node_modules/@types/node/events.d.ts:317
750
750
 
751
751
  ___
752
752
 
@@ -771,7 +771,7 @@ ___
771
771
 
772
772
  #### Defined in
773
773
 
774
- [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L44)
774
+ [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L44)
775
775
 
776
776
  ___
777
777
 
@@ -807,7 +807,7 @@ console.log(myEE.eventNames());
807
807
 
808
808
  #### Defined in
809
809
 
810
- node_modules/@types/node/events.d.ts:642
810
+ node_modules/@types/node/events.d.ts:632
811
811
 
812
812
  ___
813
813
 
@@ -830,7 +830,7 @@ set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](../wiki
830
830
 
831
831
  #### Defined in
832
832
 
833
- node_modules/@types/node/events.d.ts:499
833
+ node_modules/@types/node/events.d.ts:489
834
834
 
835
835
  ___
836
836
 
@@ -858,7 +858,7 @@ Returns the number of listeners listening to the event named `eventName`.
858
858
 
859
859
  #### Defined in
860
860
 
861
- node_modules/@types/node/events.d.ts:589
861
+ node_modules/@types/node/events.d.ts:579
862
862
 
863
863
  ___
864
864
 
@@ -894,7 +894,7 @@ console.log(util.inspect(server.listeners('connection')));
894
894
 
895
895
  #### Defined in
896
896
 
897
- node_modules/@types/node/events.d.ts:512
897
+ node_modules/@types/node/events.d.ts:502
898
898
 
899
899
  ___
900
900
 
@@ -920,7 +920,7 @@ Resolves on the next change to this input's state.
920
920
 
921
921
  #### Defined in
922
922
 
923
- [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L78)
923
+ [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L78)
924
924
 
925
925
  ___
926
926
 
@@ -949,7 +949,7 @@ Alias for `emitter.removeListener()`.
949
949
 
950
950
  #### Defined in
951
951
 
952
- node_modules/@types/node/events.d.ts:472
952
+ node_modules/@types/node/events.d.ts:462
953
953
 
954
954
  ___
955
955
 
@@ -974,7 +974,7 @@ ___
974
974
 
975
975
  #### Defined in
976
976
 
977
- [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L37)
977
+ [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L37)
978
978
 
979
979
  ___
980
980
 
@@ -1025,7 +1025,7 @@ myEE.emit('foo');
1025
1025
 
1026
1026
  #### Defined in
1027
1027
 
1028
- node_modules/@types/node/events.d.ts:387
1028
+ node_modules/@types/node/events.d.ts:377
1029
1029
 
1030
1030
  ___
1031
1031
 
@@ -1065,7 +1065,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1065
1065
 
1066
1066
  #### Defined in
1067
1067
 
1068
- node_modules/@types/node/events.d.ts:607
1068
+ node_modules/@types/node/events.d.ts:597
1069
1069
 
1070
1070
  ___
1071
1071
 
@@ -1103,7 +1103,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1103
1103
 
1104
1104
  #### Defined in
1105
1105
 
1106
- node_modules/@types/node/events.d.ts:623
1106
+ node_modules/@types/node/events.d.ts:613
1107
1107
 
1108
1108
  ___
1109
1109
 
@@ -1129,7 +1129,7 @@ Resolves on the next change to this input's state.
1129
1129
 
1130
1130
  #### Defined in
1131
1131
 
1132
- [src/input.ts:91](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L91)
1132
+ [src/input.ts:91](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L91)
1133
1133
 
1134
1134
  ___
1135
1135
 
@@ -1182,7 +1182,7 @@ emitter.emit('log');
1182
1182
 
1183
1183
  #### Defined in
1184
1184
 
1185
- node_modules/@types/node/events.d.ts:542
1185
+ node_modules/@types/node/events.d.ts:532
1186
1186
 
1187
1187
  ___
1188
1188
 
@@ -1216,7 +1216,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1216
1216
 
1217
1217
  #### Defined in
1218
1218
 
1219
- node_modules/@types/node/events.d.ts:483
1219
+ node_modules/@types/node/events.d.ts:473
1220
1220
 
1221
1221
  ___
1222
1222
 
@@ -1320,7 +1320,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1320
1320
 
1321
1321
  #### Defined in
1322
1322
 
1323
- node_modules/@types/node/events.d.ts:467
1323
+ node_modules/@types/node/events.d.ts:457
1324
1324
 
1325
1325
  ___
1326
1326
 
@@ -1353,7 +1353,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1353
1353
 
1354
1354
  #### Defined in
1355
1355
 
1356
- node_modules/@types/node/events.d.ts:493
1356
+ node_modules/@types/node/events.d.ts:483
1357
1357
 
1358
1358
  ___
1359
1359
 
@@ -1373,7 +1373,7 @@ Render a convenient debugging string.
1373
1373
 
1374
1374
  #### Defined in
1375
1375
 
1376
- [src/input.ts:102](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L102)
1376
+ [src/input.ts:102](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L102)
1377
1377
 
1378
1378
  ___
1379
1379
 
@@ -1425,7 +1425,7 @@ const { getEventListeners, EventEmitter } = require('events');
1425
1425
 
1426
1426
  #### Defined in
1427
1427
 
1428
- node_modules/@types/node/events.d.ts:270
1428
+ node_modules/@types/node/events.d.ts:262
1429
1429
 
1430
1430
  ___
1431
1431
 
@@ -1465,7 +1465,7 @@ console.log(listenerCount(myEmitter, 'event'));
1465
1465
 
1466
1466
  #### Defined in
1467
1467
 
1468
- node_modules/@types/node/events.d.ts:242
1468
+ node_modules/@types/node/events.d.ts:234
1469
1469
 
1470
1470
  ___
1471
1471
 
@@ -1549,7 +1549,7 @@ that iterates `eventName` events emitted by the `emitter`
1549
1549
 
1550
1550
  #### Defined in
1551
1551
 
1552
- node_modules/@types/node/events.d.ts:221
1552
+ node_modules/@types/node/events.d.ts:217
1553
1553
 
1554
1554
  ___
1555
1555
 
@@ -1679,7 +1679,7 @@ node_modules/@types/node/events.d.ts:157
1679
1679
 
1680
1680
  #### Defined in
1681
1681
 
1682
- node_modules/@types/node/events.d.ts:162
1682
+ node_modules/@types/node/events.d.ts:158
1683
1683
 
1684
1684
  ___
1685
1685
 
@@ -1687,31 +1687,26 @@ ___
1687
1687
 
1688
1688
  ▸ `Static` **setMaxListeners**(`n?`, ...`eventTargets`): `void`
1689
1689
 
1690
- By default `EventEmitter`s will print a warning if more than `10` listeners are
1691
- added for a particular event. This is a useful default that helps finding
1692
- memory leaks. The `EventEmitter.setMaxListeners()` method allows the default limit to be
1693
- modified (if eventTargets is empty) or modify the limit specified in every `EventTarget` | `EventEmitter` passed as arguments.
1694
- The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
1695
-
1696
1690
  ```js
1697
- EventEmitter.setMaxListeners(20);
1698
- // Equivalent to
1699
- EventEmitter.defaultMaxListeners = 20;
1700
-
1701
- const eventTarget = new EventTarget();
1702
- // Only way to increase limit for `EventTarget` instances
1703
- // as these doesn't expose its own `setMaxListeners` method
1704
- EventEmitter.setMaxListeners(20, eventTarget);
1691
+ const {
1692
+ setMaxListeners,
1693
+ EventEmitter
1694
+ } = require('events');
1695
+
1696
+ const target = new EventTarget();
1697
+ const emitter = new EventEmitter();
1698
+
1699
+ setMaxListeners(5, target, emitter);
1705
1700
  ```
1706
1701
 
1707
- **`since`** v15.3.0, v14.17.0
1702
+ **`since`** v15.4.0
1708
1703
 
1709
1704
  #### Parameters
1710
1705
 
1711
- | Name | Type |
1712
- | :------ | :------ |
1713
- | `n?` | `number` |
1714
- | `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] |
1706
+ | Name | Type | Description |
1707
+ | :------ | :------ | :------ |
1708
+ | `n?` | `number` | A non-negative number. The maximum number of listeners per `EventTarget` event. |
1709
+ | `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] | - |
1715
1710
 
1716
1711
  #### Returns
1717
1712
 
@@ -1723,4 +1718,4 @@ EventEmitter.setMaxListeners(20, eventTarget);
1723
1718
 
1724
1719
  #### Defined in
1725
1720
 
1726
- node_modules/@types/node/events.d.ts:290
1721
+ node_modules/@types/node/events.d.ts:280
@@ -26,7 +26,7 @@
26
26
 
27
27
  #### Defined in
28
28
 
29
- [src/elements/analog.ts:7](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L7)
29
+ [src/elements/analog.ts:7](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L7)
30
30
 
31
31
  ___
32
32
 
@@ -40,7 +40,7 @@ ___
40
40
 
41
41
  #### Defined in
42
42
 
43
- [src/input.ts:6](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L6)
43
+ [src/input.ts:6](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L6)
44
44
 
45
45
  ___
46
46
 
@@ -54,7 +54,7 @@ ___
54
54
 
55
55
  #### Defined in
56
56
 
57
- [src/input.ts:5](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L5)
57
+ [src/input.ts:5](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L5)
58
58
 
59
59
  ___
60
60
 
@@ -68,7 +68,7 @@ ___
68
68
 
69
69
  #### Defined in
70
70
 
71
- [src/input.ts:8](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/input.ts#L8)
71
+ [src/input.ts:8](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L8)
72
72
 
73
73
  ___
74
74
 
@@ -82,7 +82,7 @@ ___
82
82
 
83
83
  #### Defined in
84
84
 
85
- [src/elements/analog.ts:10](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L10)
85
+ [src/elements/analog.ts:10](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L10)
86
86
 
87
87
  ___
88
88
 
@@ -92,7 +92,7 @@ ___
92
92
 
93
93
  #### Defined in
94
94
 
95
- [src/elements/analog.ts:8](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L8)
95
+ [src/elements/analog.ts:8](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L8)
96
96
 
97
97
  ___
98
98
 
@@ -102,4 +102,4 @@ ___
102
102
 
103
103
  #### Defined in
104
104
 
105
- [src/elements/analog.ts:9](https://github.com/nsfm/dualsense-ts/blob/9eefd23/src/elements/analog.ts#L9)
105
+ [src/elements/analog.ts:9](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L9)