Skip to content

ReadFlags

Source: src/Cloudflare/Flagship/ReadFlags.ts

Bind a {@link App} to a Worker and obtain the Effect-native flag-evaluation client (get, getBooleanValue, getStringValue, …).

ReadFlags is a single identifier that is simultaneously the binding’s Context tag, its type, and the callable — yield* Cloudflare.Flagship.ReadFlags(app).

const flags = yield* Cloudflare.Flagship.ReadFlags(MyApp);
const enabled = yield* flags.getBooleanValue("new-checkout", false);