supertokens-web-js
Version:
SuperTokens SDK for vanilla JS for all recipes
25 lines (24 loc) • 828 B
TypeScript
import RecipeModule from "./recipe/recipeModule";
import { NormalisedAppInfo, SuperTokensConfig } from "./types";
export default class SuperTokens {
private static instance?;
appInfo: NormalisedAppInfo;
recipeList: RecipeModule<any, any>[];
constructor(config: SuperTokensConfig);
/**
* Initialise the SuperTokens SDK. Calling this function multiple times results
* in a warning and has no other effect
*
* @param config The configuration the SDK should use
*/
static init(config: SuperTokensConfig): void;
/**
* Retrieve an instance of SuperTokens
*
* @returns An instance of SuperTokens
*
* @throws If SuperTokens.init has not been called before using this function
*/
static getInstanceOrThrow(): SuperTokens;
static reset(): void;
}