-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TS migration] Migrate 'HapticFeedback' lib to TypeScript
- Loading branch information
1 parent
ec95ab0
commit 59a0f49
Showing
4 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
17 changes: 9 additions & 8 deletions
17
src/libs/HapticFeedback/index.native.js → src/libs/HapticFeedback/index.native.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {HapticFeedbackError, HapticFeedbackLongPress, HapticFeedbackPress, HapticFeedbackSuccess} from './types'; | ||
|
||
/** | ||
* Web does not support Haptic feedback | ||
*/ | ||
const press: HapticFeedbackPress = () => {}; | ||
const longPress: HapticFeedbackLongPress = () => {}; | ||
const success: HapticFeedbackSuccess = () => {}; | ||
const error: HapticFeedbackError = () => {}; | ||
|
||
export default {press, longPress, success, error}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type HapticFeedbackPress = () => void; | ||
type HapticFeedbackLongPress = () => void; | ||
type HapticFeedbackSuccess = () => void; | ||
type HapticFeedbackError = () => void; | ||
|
||
export type {HapticFeedbackPress, HapticFeedbackLongPress, HapticFeedbackSuccess, HapticFeedbackError}; |