Skip to content

createSession

createSession<T>(sessionType, expireAfterMinutes?, metadata?): 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.

expireAfterMinutes?: number

(default=5) Automatically delete the session after this many minutes.

metadata?: Object

Metadata to include with usage tracking when the session is created and completed.

Returns

T

The Session instance.


Generated using typedoc-plugin-markdown and TypeDoc