2.0.7 • Published 7 months ago

@types/socket.io-file v2.0.7

Weekly downloads
33
License
MIT
Repository
github
Last release
7 months ago

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.

2.0.5

8 months ago

2.0.7

7 months ago

2.0.6

7 months ago

2.0.4

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

5 years ago