sessionConfig.valid: make optional (#18748)

`koa-session` does not actually require this validator and will provide a default behavior if its not supplied.

see: https://github.com/koajs/session/blob/cb6d2c8448f21f6cf42efdb031798c9608f05602/lib/context.js#L152-L167
This commit is contained in:
Avindra Goolcharan
2017-08-08 11:29:26 -07:00
committed by Mohamed Hegazy
parent b32b41f3a1
commit 7e252c06da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ declare namespace session {
/**
* Hook: valid session value before use it
*/
valid(...rest: any[]): void;
valid?(...rest: any[]): void;
/**
* Hook: before save session
+1 -1
View File
@@ -1,5 +1,5 @@
import * as Koa from 'koa';
import session = require('koa-session');
import * as session from 'koa-session';
const app = new Koa();