Nitroglycerin Pickle Machine

    @types/socket.io-file
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.4 • Public • Published

    Installation

    npm install --save @types/socket.io-file

    Summary

    This package contains type definitions for socket.io-file (https://github.com/rico345100/socket.io-file).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/socket.io-file.

    index.d.ts

    // Type definitions for socket.io-file 2.0
    // Project: https://github.com/rico345100/socket.io-file
    // Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.3
    
    import { Socket } from 'socket.io';
    
    export = SocketIOFile;
    
    declare class SocketIOFile {
        constructor(socket: Socket, options: Options);
        on(event: string, cb: (fileInfo: FileInfo) => void): void;
    }
    
    interface Options {
        uploadDir: string | { [dirId: string]: string };
        maxFileSize?: number | undefined;
        accepts?: string[] | undefined;
        chunkSize?: number | undefined;
        transmissionDelay?: number | undefined;
        overwrite?: boolean | undefined;
        rename?: ((fileName: string, fileInfo: FileInfo) => string | string) | undefined;
        resume?: boolean | undefined;
    }
    
    interface FileInfo {
        name: string;
        size: number;
        path: string;
        wrote: number;
        uploadDir: string;
        data: any[];
        mime: string;
        estimated: number;
        uploadId: string;
        originalFileName: string;
    }

    Additional Details

    • Last updated: Thu, 23 Dec 2021 23:35:52 GMT
    • Dependencies: @types/socket.io
    • Global values: none

    Credits

    These definitions were written by DefinitelyTyped.

    Keywords

    none

    Install

    npm i @types/socket.io-file

    DownloadsWeekly Downloads

    41

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    4.91 kB

    Total Files

    4

    Last publish

    Collaborators

    • types