Skip to content

RPC: Simple objects with only value types as keys and values should stay as value types #10030

@tv42

Description

@tv42

What versions & operating system are you using?

wrangler 4.25.0, node v24.3.0, Linux NixOS 25.05

Please provide a link to a minimal reproduction

No response

Describe the Bug

I would have expected this RPC method:

  hello(): { greeting: string } {
    return { greeting: "Hello" };
  }

to result in a signature of Promise<{ greeting: string }>.

Instead, it becomes Promise<{ greeting: string }> & Disposable.

There's nothing to dispose there! This seems like unnecessary overhead, and complicating what should have been a simple case.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions