diff --git a/package.json b/package.json index c078b7a..fb6d376 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wavelovers", "description": "Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad.", "keywords": [ "wavelovers", "gamepad-vibrator", "gamepad-test-tool", "gamepad-vibration-test-tool" ], - "version": "1.0.2", + "version": "1.0.3", "license": "GNU GPL v3", "homepage": "https://wavelovers.ru/", "author": { diff --git a/src/models/IVibrator.ts b/src/models/IVibrator.ts index 20cd871..cdff81c 100644 --- a/src/models/IVibrator.ts +++ b/src/models/IVibrator.ts @@ -8,7 +8,7 @@ interface IVibrator { isVibrating: boolean; interval: number; update(): void; - loop(pattern: TPatternUnit[]): void; + loop(pattern: TPatternUnit[]): Promise; vibrate(pattern: TPatternUnit): void; reset(): void; sleep(ms: number): Promise; diff --git a/src/models/Vibrator.ts b/src/models/Vibrator.ts index 0e5b59c..bbfd16e 100644 --- a/src/models/Vibrator.ts +++ b/src/models/Vibrator.ts @@ -24,7 +24,7 @@ class Vibrator implements IVibrator { this.unit = gamepads[this.unit.index] as unknown as IGamepad; } - async loop(pattern: TPatternUnit[]) { + async loop(pattern: TPatternUnit[]): Promise { this.isVibrating = true; const offsetTime = 10; while (this.isVibrating === true) {