Closed u4da3 closed 4 years ago
I'm testing the structured session data with typescript. But the test does not work because of the type error.
For example, in express-session, the type definition of SessionData is as below:
express-session
SessionData
interface SessionData { [key: string]: any; cookie: SessionCookieData; }
But, the type definition in node-mocks-http is as below:
node-mocks-http
export interface Session { [key: string]: string; }
I tyied rewriting the type definition in node-mocks-http: [key: string]: string; -> [key: string]: any; And the test works successfully.
[key: string]: string;
[key: string]: any;
Hi @u4da3, would be great if you create a PR with the fix
I'm testing the structured session data with typescript. But the test does not work because of the type error.
For example, in
express-session
, the type definition ofSessionData
is as below:But, the type definition in
node-mocks-http
is as below:I tyied rewriting the type definition in
node-mocks-http
:[key: string]: string;
->[key: string]: any;
And the test works successfully.