diff --git a/.changeset/three-oranges-beam.md b/.changeset/three-oranges-beam.md new file mode 100644 index 0000000000..257e70d74c --- /dev/null +++ b/.changeset/three-oranges-beam.md @@ -0,0 +1,5 @@ +--- +'@penumbra-zone/transport-dom': patch +--- + +use Transport type for createChannelTransport return diff --git a/packages/transport-dom/src/create.ts b/packages/transport-dom/src/create.ts index 7cf08dced1..9d796a886b 100644 --- a/packages/transport-dom/src/create.ts +++ b/packages/transport-dom/src/create.ts @@ -10,7 +10,7 @@ import { PartialMessage, ServiceType, } from '@bufbuild/protobuf'; -import { Code, ConnectError, StreamResponse, UnaryResponse } from '@connectrpc/connect'; +import { Code, ConnectError, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect'; import { CommonTransportOptions } from '@connectrpc/connect/protocol'; import { errorFromJson } from '@connectrpc/connect/protocol-connect'; import { @@ -49,7 +49,7 @@ export const createChannelTransport = ({ getPort, jsonOptions, defaultTimeoutMs = 10_000, -}: ChannelTransportOptions) => { +}: ChannelTransportOptions): Transport => { const pending = new Map void>(); // this is used to recover errors that couldn't be thrown at a caller