UNPKG

@mvx/mvc

Version:

@mvx/mvc is mvc framework on server, base on koa, @tsdi frameworks

33 lines (32 loc) 771 B
/// <reference types="node" /> import { Stream } from 'stream'; import { Options } from 'content-disposition'; import { ResultValue } from './ResultValue'; import { IContext } from '../IContext'; export interface FileResultOption { /** * content type */ contentType?: string; /** * file name for download. */ filename?: string; /** * content disposition. */ disposition: Options; } /** * controller method return result type of file. * * @export * @class FileResult */ export declare class FileResult extends ResultValue { private file; private options?; constructor(file: string | Buffer | Stream, options?: FileResultOption); sendValue(ctx: IContext): Promise<void>; static ρAnn(): any; }