Why do i need to import Fetcher from @cloudflare/workers-types
`
heello. in code above i have to import Fetcher type. in cloudflare docs they don't import types. and also when i bind Fetcher type to MYBROWSER i can not use it in puppeteer.launch(env.MYBROWSER). i get this error that says argument Fetcher is not assignable to parameter of type 'BrowserWorker'
5 Replies
If you place it in your
tsconfig.json
like this: , then it should be available without having to import itno sir it did not work
and without typescript, i can not use it to launch new browser
browser = { binding = "MY_BROWSER", type = "browser" }
i bind it too
Try reloading your editor. I'm getting clean types with this:
no sir i still get type errors
nah i can not get it
i think there are problems with puppeteer's last version
what do you guys think?
still can not work it
with the tsconfig that @HardlySpookin’ pasted above it works fine. i would recommend to have
create-cloudflare
create the tsconfig too