nestjs-mvc-tools
Version:
NestJS MVC Tools is a small set of tools designed to help you get started more easily with traditional web development approaches in NestJS.
48 lines (47 loc) • 1.04 kB
TypeScript
import { Request } from "express";
declare module "express-session" {
interface SessionData {
[key: string]: any;
}
}
export declare class NestMvcFlash {
private readonly req;
private readonly FLASH_KEY;
constructor(req: Request);
/**
* 플래시 메시지 설정
*/
flash(key: string, value: any): void;
/**
* 플래시 메시지 조회
*/
get(key?: string): any;
/**
* 플래시 메시지 삭제
*/
clear(key?: string): void;
/**
* 플래시 메시지 조회 후 삭제
*/
getAndClear(key?: string): any;
/**
* 성공 메시지 설정
*/
success(message: string): void;
/**
* 에러 메시지 설정
*/
error(message: string): this;
/**
* 정보 메시지 설정
*/
info(message: string): void;
/**
* 경고 메시지 설정
*/
warning(message: string): this;
/**
* 폼 입력값 플래시 (PRG 패턴용)
*/
flashInput(except?: string[]): void;
}