Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

IncomingRequestCfProperties is not matching the definition described in docs #193

Closed
motiejunas opened this issue Feb 3, 2022 · 2 comments

Comments

@motiejunas
Copy link
Contributor

What is the source of truth for IncomingRequestCfProperties interface? Docs or the type defined by @cloudflare/workers-types? One or the other should be adjusted.

Docs:
https://developers.cloudflare.com/workers/runtime-apis/request#incomingrequestcfproperties

Types:

interface IncomingRequestCfProperties {

For instance, notice that country property is described as string | null in docs and string in this lib. Or city defined as string | null in docs, but string | undefined in here. Similar mismatch applies to the rest properties.

@mrbbot
Copy link
Contributor

mrbbot commented Oct 21, 2022

Closed by #301.

@mrbbot mrbbot closed this as completed Oct 21, 2022
@trugr
Copy link

trugr commented Dec 2, 2022

Adding a types.d.ts file containing the following fixed type errors on VS Code for me, but I'm not sure why:

interface IncomingRequestCfProperties extends IncomingRequestCfProperties {}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants