-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(mobile): ⬆️ upgrade usb lib, jest, sentry
- Loading branch information
Showing
11 changed files
with
251 additions
and
241 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,5 +1,24 @@ | ||
import { requireNativeModule } from 'expo-modules-core'; | ||
import { NativeModule } from 'expo'; | ||
|
||
import { NativeDevice } from './ReactNativeUsb.types'; | ||
|
||
type DeviceEvents = { | ||
onDeviceConnect: (device: NativeDevice | null) => void; | ||
onDeviceDisconnect: (device: NativeDevice | null) => void; | ||
}; | ||
|
||
declare class ReactNativeUsbModuleDeclaration extends NativeModule<DeviceEvents> { | ||
open: (deviceName: string) => Promise<void>; | ||
close: (deviceName: string) => Promise<void>; | ||
claimInterface: (deviceName: string, interfaceNumber: number) => Promise<void>; | ||
releaseInterface: (deviceName: string, interfaceNumber: number) => Promise<void>; | ||
selectConfiguration: (deviceName: string, configurationValue: number) => Promise<void>; | ||
transferIn: (deviceName: string, endpointNumber: number, length: number) => Promise<number[]>; | ||
transferOut: (deviceName: string, endpointNumber: number, data: string) => Promise<void>; | ||
} | ||
|
||
// It loads the native module object from the JSI or falls back to | ||
// the bridge module (from NativeModulesProxy) if the remote debugger is on. | ||
export const ReactNativeUsbModule = requireNativeModule('ReactNativeUsb'); | ||
export const ReactNativeUsbModule = | ||
requireNativeModule<ReactNativeUsbModuleDeclaration>('ReactNativeUsb'); |
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.