Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 1 addition & 4 deletions _examples/node-ts/webapp/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ExampleService } from './client.gen'

const exampleService = new ExampleService(
'http://localhost:3000',
(input, init) => fetch(input, init)
)
const exampleService = new ExampleService('http://localhost:3000', fetch)

document.addEventListener('DOMContentLoaded', () => {
const pingButton = document.getElementById('js-ping-btn')
Expand Down
2 changes: 1 addition & 1 deletion client.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class {{.Name}} implements {{.Name}} {

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