New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@types/react-file-reader-input

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-file-reader-input - npm Package Compare versions

Comparing version
2.0.0
to
2.0.1
+1
-1
react-file-reader-input/index.d.ts

@@ -25,3 +25,3 @@ // Type definitions for react-file-reader-input 2.0

*/
as?: Format;
as?: Format | undefined;

@@ -28,0 +28,0 @@ /**

{
"name": "@types/react-file-reader-input",
"version": "2.0.0",
"version": "2.0.1",
"description": "TypeScript definitions for react-file-reader-input",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-reader-input",
"license": "MIT",

@@ -34,4 +35,4 @@ "contributors": [

},
"typesPublisherContentHash": "174ff462e6301ace9b6eb7afd1d36c52ac31d911e8d357ca7aecc14fb20c0b81",
"typeScriptVersion": "3.5"
"typesPublisherContentHash": "90e2d94863897a0cb84701976d8007e19af0beaebaaed29ee4cfdcbfd3219d18",
"typeScriptVersion": "3.6"
}

@@ -9,5 +9,58 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-reader-input.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-reader-input/index.d.ts)
````ts
// Type definitions for react-file-reader-input 2.0
// Project: https://github.com/ngokevin/react-file-reader-input
// Definitions by: Dmitry Rogozhny <https://github.com/dmitryrogozhny>,
// Ali Taheri <https://github.com/alitaheri>,
// bjoluc <https://github.com/bjoluc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
import * as React from 'react';
declare class FileInput extends React.Component<FileInput.Props> {
}
declare namespace FileInput {
type Format = 'buffer' | 'binary' | 'url' | 'text';
type Result = [ProgressEvent, File];
interface Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
/**
* what format the `FileReader` should read the file as
* (i.e., `'buffer'`, `'binary'`, `'url'`, `'text'`).
*
* Defaults to `'url'`.
*/
as?: Format | undefined;
/**
* Callback function called when the files are chosen by the user.
*
* Results will be an array of arrays, the size of which depending
* on how many files were selected.
*
* Each result will be an array of two items:
*
* `progressEvent`: `result[0]` is a `ProgressEvent` object.
* You can retrieve the raw results at `progressEvent.target.result`
* among other things.
*
* `file`: `result[1]` is a `File` object. You can retrieve the file name
* at file.name among other things.
*
* @param event The event that triggered file changes
* @param results The array of files
*/
onChange(event: React.ChangeEvent<HTMLInputElement>, results: Result[]): void;
}
}
export = FileInput;
````
### Additional Details
* Last updated: Wed, 10 Jun 2020 14:58:39 GMT
* Last updated: Thu, 08 Jul 2021 20:20:40 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)

@@ -14,0 +67,0 @@ * Global values: none