cloudflare / cloudflare/chanfana
DataOf not really working?
- Dominant language
- TypeScript
- Stars
- 766
- Forks
- 70
- Avg merge
- 25m
- Merged PRs (30d)
- 4
Description
I'm trying to use DataOf on a project, and TypeScript keeps resolving everything to `any`.
For example, I have:
```
requestBody: z.object({
address: z.string(),
chainId: z.string(),
token: z.string(),
}),
```
And then I do:
```
data: DataOf
```
But the resolved types are always:

Contributor guide
Research direction
Start by reproducing the TypeScript inference issue with the provided requestBody schema and `DataOf` example. Inspect the definition and uses of `DataOf` and compare the inferred result with the schema; done means the resulting fields are no longer resolved to `any`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100