Skip to content

Commit 8d20d79

Browse files
committed
chore: load @cloudflare/workers-types in type declarations
1 parent 848e528 commit 8d20d79

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/types.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference types="@cloudflare/workers-types" />
2-
31
import type { AuthContext, Session, User } from "better-auth";
42
import type { DrizzleAdapterConfig } from "better-auth/adapters/drizzle";
53
import type { FieldAttribute } from "better-auth/db";
@@ -116,7 +114,13 @@ export interface WithCloudflareOptions<
116114
/**
117115
* Cloudflare geolocation data
118116
*/
119-
export interface CloudflareGeolocation extends Partial<IncomingRequestCfProperties> { }
117+
/**
118+
* Ensures TypeScript loads `@cloudflare/workers-types` when consuming this
119+
* package's declaration files (required for `IncomingRequestCfProperties`).
120+
*/
121+
export type CloudflareWorkersTypes = typeof import("@cloudflare/workers-types");
122+
123+
export interface CloudflareGeolocation extends Partial<IncomingRequestCfProperties> {}
120124

121125
/**
122126
* Session type enhanced with Cloudflare geolocation data

0 commit comments

Comments
 (0)