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

TypeScript definitions for react-file-reader-input

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
2.0.4
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/react-file-reader-input

Summary

This package contains type definitions for react-file-reader-input (https://github.com/ngokevin/react-file-reader-input).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-reader-input.

index.d.ts

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: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Dmitry Rogozhny, Ali Taheri, and bjoluc.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts