0.0.39 • Published 6 months ago
@types/easy-session v0.0.39
Installation
npm install --save @types/easy-session
Summary
This package contains type definitions for easy-session (https://github.com/DeadAlready/node-easy-session).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/easy-session.
index.d.ts
// Type definitions for easy-session
// Project: https://github.com/DeadAlready/node-easy-session
// Definitions by: Karl Düüna <https://github.com/DeadAlready>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import express = require('express');
import expressSession = require('express-session');
declare module 'express-session' {
interface Session {
login(callback: Function): void;
login(extend: Object, callback: (err?: any) => void): void;
login(role: string, callback: (err?: any) => void): void;
login(role: string, extend: Object, callback: (err?: any) => void): void;
logout(callback: (err?: any) => void): void;
isLoggedIn(role?: string): boolean;
isGuest(): boolean;
isFresh(): boolean;
setRole(role: string): Session;
getRole(): string;
hasRole(role: string): boolean;
}
}
export interface SessionOptions {
ipCheck?: boolean | undefined;
uaCheck?: boolean | undefined;
freshTimeout?: number | undefined;
maxFreshTimeout?: number | undefined;
}
export function main(session: typeof expressSession, options?: SessionOptions): express.RequestHandler;
export function isLoggedIn(errorCallback?: (err?: any) => void): express.RequestHandler;
export function isFresh(errorCallback?: (err?: any) => void): express.RequestHandler;
export function checkRole(role: string, errorCallback?: (err?: any) => void): express.RequestHandler;
Additional Details
- Last updated: Thu, 08 Jul 2021 12:01:02 GMT
- Dependencies: @types/express, @types/express-session
- Global values: none
Credits
These definitions were written by Karl Düüna.
0.0.37
8 months ago
0.0.38
7 months ago
0.0.39
6 months ago
0.0.36
3 years ago
0.0.35
3 years ago
0.0.34
7 years ago
0.0.33
7 years ago
0.0.32
7 years ago
0.0.31
8 years ago
0.0.30
8 years ago
0.0.29
8 years ago
0.0.28
8 years ago
0.0.27-alpha
8 years ago
0.0.26-alpha
8 years ago
0.0.25-alpha
8 years ago
0.0.24-alpha
8 years ago
0.0.23-alpha
8 years ago
0.0.22-alpha
8 years ago
0.0.21-alpha
8 years ago
0.0.16-alpha
8 years ago
0.0.15-alpha
8 years ago