The type `D1PreparedStatement` has a `statement` property, but `TS` doesn't know about it ```ts //

The type
D1PreparedStatement
has a
statement
property, but
TS
doesn't know about it
// This code works
const ps = env.DB.prepare(pragmaStmts[key]);
const data = await ps.all();
jsonData.push({ statement: ps.statement, [key]: data.results });
//ts complains:
`Property 'statement' does not exist on type 'D1PreparedStatement'.ts(2339)`

All the Cloudflare D1 types work as expected as far i can tell, except this one.
# npm ls
@cloudflare/workers-types@4.20241230.0
Was this page helpful?