
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@types/react-native-torch
Advanced tools
TypeScript definitions for react-native-torch
npm install --save @types/react-native-torch
This package contains type definitions for react-native-torch (https://github.com/ludo/react-native-torch#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-torch.
declare const Torch: {
/**
* Used to turn on or off the torch. Pass `true` to turn on and `false` to
* turn off
*
* @example
* Torch.switchState(true); // Turn ON
* Torch.switchState(false); // Turn OFF
*
* @param newState `true` for on or `false` for off
*/
switchState(newState: boolean): void;
/**
* On android, we need to ask for permissions before being able to turn on/off
* the torch
*
* @example
* if (Platform.OS === 'ios') {
* Torch.switchState(this.isTorchOn);
* } else {
* const cameraAllowed = await Torch.requestCameraPermission(
* 'Camera Permissions', // dialog title
* 'We require camera permissions to use the torch on the back of your phone.' // dialog body
* );
*
* if (cameraAllowed) {
* Torch.switchState(this.isTorchOn);
* }
* }
*
* @param dialogTitle The title of the permissions dialog
* @param dialogBody The body text of the permissions dialog
*/
requestCameraPermission(dialogTitle: string, dialogBody: string): Promise<boolean>;
};
export default Torch;
These definitions were written by Ben Lorantfy.
FAQs
TypeScript definitions for react-native-torch
The npm package @types/react-native-torch receives a total of 510 weekly downloads. As such, @types/react-native-torch popularity was classified as not popular.
We found that @types/react-native-torch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.