-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Getting started with solid, and wanted to create something similar but I have been struggling to get the createAgent.js file converted to typescript.
My current problem is:
const headers = {},
body = {},
opts = { method, headers, body };
if (data !== undefined) {
headers["Content-Type"] = "application/json";
opts.body = JSON.stringify(data);
}
But, headers["Content-type"] has this error, which I don't know how to fix, as u can't exactly get the headers type from the fetch api.
Element implicitly has an 'any' type because expression of type '"Content-Type"' can't be used to index type '{}'.
Property 'Content-Type' does not exist on type '{}'.
I know is kinda dumb but any help would be appreciated
Metadata
Metadata
Assignees
Labels
No labels