-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Confirm this is a Typescript library issue and not an underlying Cloudflare API issue
- This is an issue with the Typescript library
Describe the bug
Hi team!
The types for WorkersBindingKindJson seem to be:
export interface WorkersBindingKindJson {
/**
* JSON data to use.
*/
json: string;Is this correct? It prompted me to pass json: JSON.stringify({ a: "b"}) to the SDK, but this results in the variable being saved as "{\"a\":\"b\"}" instead of the expected {"a":"b"}.
Ignoring the type error and passing json: {a: "b"} seems to work as expected.
To Reproduce
const binding: ScriptUpdateParams.Metadata.WorkersBindingKindJson = {
name: 'MY_TEST',
type: 'json',
json: {
name: 'value',
},
}
Code snippets
OS
macOS
Runtime version
Typescript 4.9.4
Library version
5.2
Metadata
Metadata
Assignees
Labels
No labels