diff --git a/core/src/utils/haptic.ts b/core/src/utils/haptic.ts index 5c0853c355..95663d99d1 100644 --- a/core/src/utils/haptic.ts +++ b/core/src/utils/haptic.ts @@ -53,7 +53,7 @@ export function hapticSelectionEnd() { * Use this to indicate success/failure/warning to the user. * options should be of the type `{ type: 'success' }` (or `warning`/`error`) */ -export function hapticNotification(options: { type: string }) { +export function hapticNotification(options: { type: 'success' | 'warning' | 'error' }) { const engine = (window as any).TapticEngine; if (engine) { engine.notification(options); @@ -64,7 +64,7 @@ export function hapticNotification(options: { type: string }) { * Use this to indicate success/failure/warning to the user. * options should be of the type `{ style: 'light' }` (or `medium`/`heavy`) */ -export function hapticImpact(options: { style: string }) { +export function hapticImpact(options: { style: 'light' | 'medium' | 'heavy' }) { const engine = (window as any).TapticEngine; if (engine) { engine.impact(options);