Skip to content

Commit

Permalink
export flattenErrorType
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Aug 19, 2024
1 parent bf3dc0a commit 3296099
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions __tests__/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ describe.each(testMatrix())(

// test
const result = await client.fallible.divide.rpc({ a: 10, b: 2 });

expect(result).toStrictEqual({ ok: true, payload: { result: 5 } });
const result2 = await client.fallible.divide.rpc({ a: 10, b: 0 });
expect(result2).toStrictEqual({
Expand Down
2 changes: 1 addition & 1 deletion router/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function handleProc(
procedureName: string,
abortSignal?: AbortSignal,
): AnyProcReturn {
const session = transport.getOrCreateSession(serverId);
const session = transport._getOrCreateSession(serverId);

Check failure on line 284 in router/client.ts

View workflow job for this annotation

GitHub Actions / build-and-test (macos-latest)

Property '_getOrCreateSession' does not exist on type 'ClientTransport<Connection>'. Did you mean 'getOrCreateSession'?

Check failure on line 284 in router/client.ts

View workflow job for this annotation

GitHub Actions / build-and-test (ubuntu-latest)

Property '_getOrCreateSession' does not exist on type 'ClientTransport<Connection>'. Did you mean 'getOrCreateSession'?
const sessionScopedSend = transport.getSessionBoundSendFn(
serverId,
session.id,
Expand Down
1 change: 1 addition & 0 deletions router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type {
SubscriptionProcedure,
StreamProcedure,
ProcedureErrorSchemaType,
flattenErrorType,
} from './procedures';
export type { Writable, Readable } from './streams';
export {
Expand Down
2 changes: 1 addition & 1 deletion util/testHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export function getClientSendFn(
clientTransport: ClientTransport<Connection>,
serverTransport: ServerTransport<Connection>,
) {
const session = clientTransport.getOrCreateSession(serverTransport.clientId);
const session = clientTransport._getOrCreateSession(serverTransport.clientId);

Check failure on line 214 in util/testHelpers.ts

View workflow job for this annotation

GitHub Actions / build-and-test (macos-latest)

Property '_getOrCreateSession' does not exist on type 'ClientTransport<Connection>'. Did you mean 'getOrCreateSession'?

Check failure on line 214 in util/testHelpers.ts

View workflow job for this annotation

GitHub Actions / build-and-test (ubuntu-latest)

Property '_getOrCreateSession' does not exist on type 'ClientTransport<Connection>'. Did you mean 'getOrCreateSession'?
return clientTransport.getSessionBoundSendFn(
serverTransport.clientId,
session.id,
Expand Down

0 comments on commit 3296099

Please sign in to comment.