Skip to content

Common Server Options: create shared type #25570

Open

Description

@isaacs

Add ServerRequestOptions. Make each runtime options type extend it, with Omit for gaps. Add the BUGBOT rule. Type-only, no runtime behavior change.

For Node and Bun: ignoreRequestBody request type (Node, Bun node:http). Narrow the parameter to RequestOptions & HttpIncomingMessage. This is not a break: a tsc check showed that callbacks typed with RequestOptions, and untyped callbacks that read req.path, both still compile. Users get the real IncomingMessage fields. A comment marks the RequestOptions half as deprecated, for removal in v12. The as cast in packages/node/src/integrations/http/httpServerIntegration.ts:91 goes away.

Activity

  1. self-assigned this
    on Oct 20, 2026
  2. linear-code commented on Oct 20, 2026

    @linear-code
  3. added 2 commits that reference this issue on Oct 21, 2026
    b8ffd22
    80afcb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions