70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
// Populates Cloudflare.Exports (the type of ctx.exports) with loopback
|
|
// bindings derived from the main module's exports.
|
|
declare namespace Cloudflare {
|
|
interface GlobalProps {
|
|
mainModule: typeof import("./src/worker");
|
|
}
|
|
}
|
|
|
|
// Adds `version` from the experimental `enable_version_api` compat flag.
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- generic must match the original declaration for interface merging
|
|
interface ExecutionContext<Props = unknown> {
|
|
readonly version?: {
|
|
cohort?: string;
|
|
key?: string;
|
|
override?: string;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Minimal RPC binding type for the AccountCohortQuerier entrypoint
|
|
* in the account-services worker. Replace with the published type from
|
|
* `@cloudflare/workers-toolbox-types` once available with bundled deps.
|
|
*/
|
|
export interface AccountCohortQuerierBinding {
|
|
lookupAccountCohort(accountID: string): Promise<
|
|
| { ok: true; result: string | null; meta: { workersVersion: string } }
|
|
| {
|
|
ok: false;
|
|
errors: Array<{ name: string; message: string; code: string }>;
|
|
}
|
|
>;
|
|
}
|