I cannot figure out this typing error

I cannot figure out this typing error
No description
D
DanTheGoodman236d ago
export function CreateWorkflow<T>(options: DurableWorkflowOptions<T>): DurableObject {
// options: DurableWorkflowOptions<T>

return class DurableWorkflow<T> implements DurableObject {
state: DurableObjectState
alarmStack: AlarmStack

constructor(state: DurableObjectState) {
this.state = state
this.alarmStack = new AlarmStack(this.state)
}

async fetch(request: Request) {
return new Response("unknown path", {
status: 404
})
}

async alarm() {}
}
}
export function CreateWorkflow<T>(options: DurableWorkflowOptions<T>): DurableObject {
// options: DurableWorkflowOptions<T>

return class DurableWorkflow<T> implements DurableObject {
state: DurableObjectState
alarmStack: AlarmStack

constructor(state: DurableObjectState) {
this.state = state
this.alarmStack = new AlarmStack(this.state)
}

async fetch(request: Request) {
return new Response("unknown path", {
status: 404
})
}

async alarm() {}
}
}
I've got up to date types
D
DanTheGoodman236d ago
it does have those things though...
No description
D
DanTheGoodman236d ago
if I remove the implements, it says it doesn't have the method
No description
D
DanTheGoodman236d ago
if I let it autofill that it does
fetch(request: Request<unknown, CfProperties<unknown>>): Response | Promise<Response> {

}
fetch(request: Request<unknown, CfProperties<unknown>>): Response | Promise<Response> {

}
D
DanTheGoodman236d ago
ugh
No description
D
DanTheGoodman236d ago
I removed the : DurableObject from the top level function and it seems to work fine now
IM
Isaac McFadyen236d ago
Try importing Request from workers-types too. Looks like you're trying to use the built-in Request which is different from the Workers Request.
D
DanTheGoodman236d ago
Did that, got a different error That was actually missing the methods
Want results from more Discord servers?
Add your server
More Posts
Testing on latests wranglerCan someone point me to some examples to testing my worker using vitest/jest? I encountered the minHi all may I ask if Email Routing nowHi all, may I ask if Email Routing now supports sending emails? If still not, what are you guys usinIIRC there is no way to launch a promiseIIRC there is no way to launch a promise in a durable object (from a request) in such a way that doe308 for newly bought domainHey, I just bought a domain on cloudfare : https://citeasy.app However, I can't seem to access it. soketiCan someone help me understand costs associated with using workers for websockets? I'm specificallynodejs_compat compatibility-flags flags not working for Pages functionsI've added nodejs_compat to both prod and preview in the UI but every deploy fails with these errorsworker to allow web scrape by friendly bot?I'm using an AI app called Mendable to scrape my own website for training. CF is blocking their scrarpat not found (Code: 10003) , How to solve the problem ?The website was infected some time ago, the problem was fixed, but when I click the request review bPort redirectionIs there any means to reroute requests to a different port based on e.g, hostname? For example this Small error in the worker-tail documentationI don't think it should say `index.js` when it's showing a JSON in the documentation for worker-tailSveltekit + Cloudflare Pages + ResendHello! I've been banging my head against a wall as i don't know how to go about finding out whats wrconnect to hibernatable websocket,then how to send the Offline messages to the clientI use the warn method,but it doesn’t Passing parameters,I think it should be had a webSocketOpen metI get the error just when starting devI get the error just when starting dev mode no requests made. Let me start a thread with the code peExecuting Deployments in Workers via HTTP Requests Post-Content UpdateIs it possible to execute a deployment by sending an HTTP request to Workers when updating content fWHIP Camera streamHi all, I am trying to test WHIP on Cloudflare using OBS for now. However, I have had no luck gettiHTTP ERROR 404Does this mean the cloudfared servers are down or having issues?Cloudflare URL mappingHello 🖐️ For example in Cloudflare: I have https://example.com/assets/image/keepcalm.jpg and I waWorker using fetch gets 522 from CF Pages ProjectHere is my problem. User hits my pages website (origin), the javascript that is loaded hits the pageR2.dev subdomain has been set to 'allow' status. But when open the link, it showed Error 404."Error 404 This object could not be viewed You are not authorized to view this object This object dPages function not binding to workerI am trying to use a service binding to bind my page "function" to a worker. When calling `env.myot