Skip to content

fix(sdk-typescript): type safety and backpressure handling #72

Description

@jdmanring

Summary

Fixes for sdk-typescript package:

  • C-04: Made isControlCancel type guard runtime-safe (request_id optional but guard required it)
  • C-05: Replaced unsafe as never cast with proper discriminated union typing
  • H-19: Fixed ProcessTransport backpressure handling (write() returns false)

Files Changed

  • packages/sdk-typescript/src/types/protocol.ts
  • packages/sdk-typescript/src/query/Query.ts
  • packages/sdk-typescript/src/transport/ProcessTransport.ts

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor
  • New feature
  • Breaking change

Testing

  • Unit tests pass
  • Integration tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions