Skip to content

refactor(lambda): simplify streaming handler and remove type workaround#4656

Open
albidoo wants to merge 2 commits intohonojs:mainfrom
albidoo:fix-type-error
Open

refactor(lambda): simplify streaming handler and remove type workaround#4656
albidoo wants to merge 2 commits intohonojs:mainfrom
albidoo:fix-type-error

Conversation

@albidoo
Copy link
Copy Markdown

@albidoo albidoo commented Jan 30, 2026

found this while going through codebase
image

declare const awslambda: {
  streamifyResponse: (
    handler: (
      event: LambdaEvent,
      responseStream: NodeJS.WritableStream,
      context: LambdaContext
    ) => Promise<void>
  ) => Handler
  HttpResponseStream: {
    from: (
      stream: NodeJS.WritableStream,
      metadata: { statusCode: number; headers: Record<string, string>; cookies: string[] }
    ) => NodeJS.WritableStream
  }
}

This ensures
streamHandle
is fully type-safe.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant