Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class Flagship
import { Flagship } from "https://deno.land/x/flagship_io_js_sdk@3.1.4/main/Flagship.ts";

Constructors

new
private
Flagship()

Properties

private
_config: IFlagshipConfig
private
_configManger: IConfigManager
private
_status: FlagshipStatus
private
optional
_visitorInstance: Visitor
private
configManager: IConfigManager

Methods

protected
setStatus(status: FlagshipStatus): void

Return the current config set by the customer and used by the SDK.

Return current status of Flagship SDK.

getVisitor(): Visitor | undefined

Return the last visitor created if isNewInstance key is false. Return undefined otherwise.

newVisitor(visitorId?: string | null, context?: Record<string, primitive>): Visitor

Create a new visitor with a context.

Static Properties

private
_instance: Flagship

Static Methods

protected
getInstance(): Flagship

When called, it will batch and send all hits that are in the pool before the application is closed

Return the current config set by the customer and used by the SDK.

Return current status of Flagship SDK.

getVisitor(): Visitor | undefined

Return the last visitor created if isNewInstance key is false. Return undefined otherwise.

newVisitor(visitorId?: string | null, context?: Record<string, primitive>): Visitor

Create a new visitor with a context.

Create a new visitor with a context.

newVisitor(param1?: NewVisitor | string | null, param2?: Record<string, primitive>): Visitor
start(
envId: string,
apiKey: string,
): Flagship

Start the flagship SDK, with a custom configuration implementation