
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@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
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.