Skip to content

createSession

createSession<T>(sessionType, expireAfterInactivitySeconds?, expirationCallback?): T

Creates a new Session instance allowing you to call its methods.

Type parameters

T extends Session

Parameters

sessionType: (…args) => T

The class type that extends Session.

expireAfterInactivitySeconds?: number

How many seconds after the last call is made to the session to automatically delete the session.

expirationCallback?: (sessionId) => void

A callback to call right before the session is deleted due to expiration.

Returns

T

The Session instance.


Generated using typedoc-plugin-markdown and TypeDoc