Skip to content

Allow go-to-definition in wrangler types RPC output #9682

Open
cloudflare/workerd
#4401
@mmkal

Description

@mmkal

Describe the solution

I'm not sure where exactly the source of worker-configuration.d.ts types is - the wrangler package seems to get its types from miniflare but haven't dug into how that works. But manually making this change to my worker-configuration.d.ts means I can cmd-click into RPC classes:

Image

Before (cmd-click on the rpc method in cursor/vscode does nothing):

Screen.Recording.2025-06-19.at.2.16.18.PM.mov

After (cmd-click goes to the rpc method implementation):

Screen.Recording.2025-06-19.at.2.17.25.PM.mov

I believe when you mess with the key types in a mapped object typescript just gives up on tracking where the original property comes from.

I'd be happy to open a PR if someone can point me to wherever the source of truth for this generated code is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions