Typescript errors showing quick edit for Javascript workers

For Workes & Pages, what is the name of the domain?

workers.dev

What is the error number?

ts(2304)

What is the error message?

[{ “resource”: “/my-test-worker/worker.js”, “owner”: “typescript”, “code”: “2304”, “severity”: 8, “message”: “Cannot find name ‘Response’.”, “source”: “ts”, “startLineNumber”: 13, “startColumn”: 16, “endLineNumber”: 13, “endColumn”: 24 }]

What is the issue or error you’re encountering

I’m seeing TypeScript type definitions being used on all my Javascript workers. This is causing errors to show up in quick edit that are actually not errors at all. Code works fine, but showing these errors makes it difficult to decipher other real errors that may be present.

What steps have you taken to resolve the issue?

First noticed this when updating a production worker, even though I had not seen these errors in the past. The errors can be ignored because the code still works, but it’s hard to know which errors need attention vs which are false positives. It looks like updating the jsconfig.json file might fix it, but it appears to be read only, so I can’t change it.

What are the steps to reproduce the issue?

Create any Javascript worker that uses global objects and view in quick edit

Screenshot of the error

This seems to have been corrected internally by the Cloudflare team

Hey,

Yes sorry - I thought we had replied to this. This is indeed fixed, thanks for the report!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.