I’m writing a class called Router with TypeScript. I have an instance of that class with a public method called handle, which is being called successfully to handle the incoming request. This public method has logic to work for both HTTP and Service Workers… it sees that the request is coming from Workers and calls a private method called this.handleEdge
Here’s the problem… Workers dies at that point and says “Uncaught (in promise) TypeError: this.handleEdge is not a function” I’m staring straight at the method. TypeScript is happy. The method is totally there right underneath the public method that it just called.
Does Cloudflare Workers not support private methods or something??