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

2.0.7 • 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

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

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/socket.io-file

Weekly Downloads

159

Version

2.0.7

License

MIT

Unpacked Size

4.13 kB

Total Files

5

Last publish

Collaborators

  • types