compileDraft
function compileDraft(draft, options): Snapshot;Defined in: snapshot.ts:68
Compile a draft into an immutable snapshot. Does not persist anything.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
draft |
Draft |
options |
CompileOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { compileDraft } from "@xtandard/flags";
const snapshot = compileDraft( { projectKey: "default", environmentKey: "production", flags: {} }, { version: "v1", createdBy: { id: "ci", name: "CI" } },);// snapshot.version === "v1"