Skip to content

Commit

Permalink
Apply the fetch wrapper fixes from typescript/javascript generators (w…
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Nov 16, 2022
1 parent 5e1fb05 commit 7bcb3c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _examples/golang-nodejs/client/client.gen.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class ExampleService {
constructor(hostname, fetch) {
this.path = '/rpc/ExampleService/'
this.hostname = hostname
this.fetch = fetch
this.fetch = () => fetch
}

url(name) {
Expand Down
2 changes: 1 addition & 1 deletion _examples/hello-webrpc-ts/webapp/src/client.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ExampleService implements ExampleService {

constructor(hostname: string, fetch: Fetch) {
this.hostname = hostname
this.fetch = fetch
this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init)
}

private url(name: string): string {
Expand Down
2 changes: 1 addition & 1 deletion _examples/hello-webrpc/webapp/client.gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ExampleService {
constructor(hostname, fetch) {
this.path = '/rpc/ExampleService/'
this.hostname = hostname
this.fetch = fetch
this.fetch = () => fetch
}

url(name) {
Expand Down
2 changes: 1 addition & 1 deletion _examples/node-ts/webapp/client.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ExampleService implements ExampleService {

constructor(hostname: string, fetch: Fetch) {
this.hostname = hostname
this.fetch = fetch
this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init)
}

private url(name: string): string {
Expand Down

0 comments on commit 7bcb3c4

Please sign in to comment.