Workers Binding API

So the Typescript Support section on this page: https://developers.cloudflare.com/d1/worker-api/#typescript-support Shows a typed run() function: .run<OrderRow>(); But if I try that in my own code (with my type) I get a linting error: Untyped function calls may not accept type arguments.ts(2347) Is that page incorrect? Or am I missing an import that correctly defines the run() function? Note that functionally, the code works fine.
Cloudflare Docs
Workers Binding API
You can execute SQL queries on your D1 database from a Worker using the Worker Binding API. To do this, you can perform the following steps:
1 Reply
omortis
omortisOP2mo ago
I think I fixed this by running npm run cf-typegen? Does that sound correct? I always forget about that.. !resolved

Did you find this page helpful?