Skip to content

Commit

Permalink
V2: Remove createPromiseClient and PromiseClient (#1240)
Browse files Browse the repository at this point in the history
Signed-off-by: Sri Krishna Paritala <skrishna@buf.build>
  • Loading branch information
srikrsna-buf committed Sep 19, 2024
1 parent d0b30f3 commit 8b25cf3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
8 changes: 4 additions & 4 deletions packages/connect-web-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ usually do. We repeat this for an increasing number of RPCs.

| code generator | RPCs | bundle size | minified | compressed |
| -------------- | ---: | ----------: | --------: | ---------: |
| Connect-ES | 1 | 276,503 b | 176,399 b | 35,752 b |
| Connect-ES | 4 | 280,755 b | 179,501 b | 36,598 b |
| Connect-ES | 8 | 285,618 b | 183,932 b | 37,485 b |
| Connect-ES | 16 | 294,746 b | 191,556 b | 38,999 b |
| Connect-ES | 1 | 276,503 b | 176,399 b | 35,786 b |
| Connect-ES | 4 | 280,755 b | 179,501 b | 36,562 b |
| Connect-ES | 8 | 285,618 b | 183,932 b | 37,491 b |
| Connect-ES | 16 | 294,746 b | 191,556 b | 38,985 b |
| gRPC-Web | 1 | 876,563 b | 548,495 b | 52,300 b |
| gRPC-Web | 4 | 928,964 b | 580,477 b | 54,673 b |
| gRPC-Web | 8 | 1,004,833 b | 628,223 b | 57,118 b |
Expand Down
10 changes: 5 additions & 5 deletions packages/connect-web-bench/chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/connect/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export {
} from "./http-headers.js";
export { createCallbackClient } from "./callback-client.js";
export type { CallbackClient } from "./callback-client.js";
export { createClient, createPromiseClient } from "./promise-client.js";
export type { Client, PromiseClient } from "./promise-client.js";
export { createClient } from "./promise-client.js";
export type { Client } from "./promise-client.js";
export type { CallOptions } from "./call-options.js";
export type { Transport } from "./transport.js";
export type {
Expand Down
15 changes: 0 additions & 15 deletions packages/connect/src/promise-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ export type Client<Desc extends DescService> = {
: never;
};

/**
* @deprecated use Client
*/
export type PromiseClient<T extends DescService> = Client<T>;

/**
* Create a Client for the given service, invoking RPCs through the
* given transport.
Expand All @@ -76,16 +71,6 @@ export function createClient<T extends DescService>(
}) as Client<T>;
}

/**
* @deprecated use createClient.
*/
export function createPromiseClient<T extends DescService>(
service: T,
transport: Transport,
) {
return createClient(service, transport);
}

/**
* UnaryFn is the method signature for a unary method of a PromiseClient.
*/
Expand Down

0 comments on commit 8b25cf3

Please sign in to comment.