Skip to content

feat: TRPC Proxy Client's context type #4876

@yikkwongwong

Description

@yikkwongwong

Describe the feature you'd like to request

Currently TRPC Proxy Client context is of type ClientContext and is not an extendable interface like OperationContext.

Describe the solution you'd like to see

Can TRPC Proxy client's context follow OperationContext? Or make it an interface so we can extend on it.

Describe alternate solutions

I am not sure why Proxy Client did not use OperationContext but the terminating link is using it. Would be good if both types are synced.

Additional information

type ClientContext = Record<string, unknown>;

/**
 * @internal
 */
export interface ProcedureOptions {
  /**
   * Client-side context
   */
  context?: ClientContext;
  signal?: AbortSignal;
}

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR implementing this feature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✅ accepted-PRs-welcomeFeature proposal is accepted and ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions