Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
interface IFSFlag
Re-export
import { type IFSFlag } from "https://deno.land/x/flagship_io_js_sdk@4.0.1/index.ts";

This class represents a flag in the Flagship SDK. It helps you retrieve the flag value, access flag metadata, expose the flag, verify the flag's existence, and get the flag status

Properties

exists: () => boolean

Checks if the flag exists.

visitorExposed: () => Promise<void>

Notifies Flagship that the visitor has been exposed to and seen this flag.

readonly
metadata: IFSFlagMetadata

Returns the metadata of the flag.

readonly
status: FSFlagStatus

Returns the status of the flag.

Methods

getValue<T>(defaultValue: T, visitorExposed?: boolean): (T extends null ? unknown : T)

Returns the value of the flag. If the flag exists and the type of the default value matches the flag type value. It can expose the flag if needed.