Skip to content

effect@4.0.0-beta.98 publishes empty preResponseHandler.d.ts used by HttpEffect #6431

Description

@Togrofi

What happened

effect@4.0.0-beta.98 publishes dist/unstable/http/HttpEffect.d.ts importing and re-exporting appendPreResponseHandlerUnsafe from ./internal/preResponseHandler.ts, but the published dist/unstable/http/internal/preResponseHandler.d.ts contains only export {}.

With strict TypeScript and skipLibCheck: false, importing the v4 HttpApi/HTTP server surface fails with:

node_modules/effect/dist/unstable/http/HttpEffect.d.ts(9,10): error TS2305: Module '"./internal/preResponseHandler.ts"' has no exported member 'appendPreResponseHandlerUnsafe'.

Reproduction

  1. Install exact effect@4.0.0-beta.98 and @effect/platform-node@4.0.0-beta.98.
  2. Set module/moduleResolution to NodeNext, strict mode on, and skipLibCheck: false.
  3. Import HttpApiBuilder from effect/unstable/httpapi or NodeHttpServer from @effect/platform-node.
  4. Run tsc --noEmit.

Package/source mismatch

The matching source file, src/unstable/http/internal/preResponseHandler.ts, exports both requestPreResponseHandlers and appendPreResponseHandlerUnsafe. The runtime JS also contains those exports. Only the generated/published declaration is empty.

Expected

The declaration file should expose the same types-only surface as the source/runtime. No runtime behavior change appears necessary.

Temporary downstream patch

We are temporarily restoring declarations for PreResponseHandler, requestPreResponseHandlers, and appendPreResponseHandlerUnsafe with patch-package. We will remove that patch when the published declaration is corrected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions