2.0.7 • Published 7 months ago
@types/socket.io-file v2.0.7
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.