mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
Fix lint problems
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
import flash from "express-flash-2";
|
||||
|
||||
flash();
|
||||
flash();
|
||||
|
||||
20
types/express-flash-2/index.d.ts
vendored
20
types/express-flash-2/index.d.ts
vendored
@@ -1,22 +1,22 @@
|
||||
// Type definitions for express-flash-2 1.0.1
|
||||
// Type definitions for express-flash-2 1.0
|
||||
// Project: https://github.com/jack2gs/express-flash-2
|
||||
// Definitions by: Matheus Salmi <https://github.com/mathsalmi/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace Express {
|
||||
export interface Request {
|
||||
interface Request {
|
||||
session?: Session;
|
||||
}
|
||||
|
||||
export interface Session {
|
||||
interface Session {
|
||||
flash: Flash;
|
||||
}
|
||||
|
||||
export interface Flash {
|
||||
[key: string]: any[]
|
||||
interface Flash {
|
||||
[key: string]: any[];
|
||||
}
|
||||
|
||||
export interface Response {
|
||||
interface Response {
|
||||
/**
|
||||
* Queue flash `msg` of the given `type`.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ declare namespace Express {
|
||||
|
||||
locals: {
|
||||
flash: Flash
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,5 +51,7 @@ declare module 'express-flash-2' {
|
||||
/**
|
||||
* Expose `flash()` function on responses.
|
||||
*/
|
||||
export default function flash(): express.RequestHandler;
|
||||
}
|
||||
function flash(): express.RequestHandler;
|
||||
|
||||
export = flash;
|
||||
}
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-single-declare-module": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"expect": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user