Workspaces refactor #86

Merged
norm merged 189 commits from refactor/workspaces into main 2022-08-28 14:46:45 +00:00
Showing only changes of commit b7fd9e8c55 - Show all commits

View file

@ -46,7 +46,9 @@ export class APIClient {
}) { }) {
this.origin = opts.origin; this.origin = opts.origin;
this.credential = opts.credential; this.credential = opts.credential;
this.fetch = opts.fetch || fetch; // ネイティブ関数をそのまま変数に代入して使おうとするとChromiumではIllegal invocationエラーが発生するため、
// 環境で実装されているfetchを使う場合は無名関数でラップして使用する
this.fetch = opts.fetch || ((...args) => fetch(...args));
} }
public request<E extends keyof Endpoints, P extends Endpoints[E]['req']>( public request<E extends keyof Endpoints, P extends Endpoints[E]['req']>(