-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
Priority: NormalMinor issue impacting one or more usersMinor issue impacting one or more usersType: Feature RequestA big idea that would be split into smaller piecesA big idea that would be split into smaller pieces
Description
Describe the feature you'd like
When using wrangler types --x-include-runtime support generating types for service workers. Today, it only generates a Fetcher, which does not include the typing needed to pull in functions.
Describe alternatives you've considered
The only option I can envision is hard-coding Service<Engine> into the output. If there is a better alternative, I'm all ears.
Additional context
wrangler.toml
services = [
{ service = "engine", binding = "ENGINE", entrypoint = "EngineService" }
]You will see the following after running wrangler types --x-include-runtime.
worker-configuration.d.ts
interface Env {
ENGINE: Fetcher;
}Which means that any function that is referenced is not going to work with typed support
env.ENGINE.anyFunction()Metadata
Metadata
Assignees
Labels
Priority: NormalMinor issue impacting one or more usersMinor issue impacting one or more usersType: Feature RequestA big idea that would be split into smaller piecesA big idea that would be split into smaller pieces