Skip to content

Cloudflare custom entrypoint type mismatch #14038

@alexanderniebuhr

Description

@alexanderniebuhr

Astro Info

Astro                    v5.10.2
Node                     v22.16.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/starlight

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Argument of type 'Request<unknown, IncomingRequestCfProperties>' is not assignable to parameter of type 'import("/Users/alexanderniebuhr/Developer/Projects/astrolicious/astro-tips/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workers-types/index").Request<unknown, import("/Users/alexanderniebuhr/Developer/Projects/astrolicious/astro-tips/node_modules/.pnpm/@cloudflare+workers-types@...' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
The types of 'clone().headers' are incompatible between these types.
Property 'getAll' is missing in type 'Headers' but required in type 'import("/Users/alexanderniebuhr/Developer/Projects/astrolicious/astro-tips/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workers-types/index").Headers'.ts(2379)
index.ts(1516, 3): 'getAll' is declared here.

What's the expected result?

The passed request cloudflare should be accepted by the exported handler function

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions