File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ interface FetchResponse {
7979 arrayBuffer ( ) : Promise < ArrayBuffer > ;
8080}
8181
82- interface FetchRequestInit {
82+ interface FetchRequestOptions {
8383 method ?: string ;
8484 headers ?: StringKeyWithStringValue ;
8585 body ?: any ;
8686}
8787
88- type Fetcher = ( input : string | URL , init ?: FetchRequestInit ) => Promise < FetchResponse > ;
88+ type Fetcher = ( input : string | URL , options ?: FetchRequestOptions ) => Promise < FetchResponse > ;
8989
9090export class ApiClient {
9191 public requestAsync ( options : ApiRequestOptions ) : Promise < ApiResult > {
@@ -97,7 +97,7 @@ export class ApiClient {
9797
9898 const responseEncoding : BufferEncoding | null = options . encoding === null ? null : options . encoding || 'utf-8' ;
9999
100- const requestOptions : FetchRequestInit = {
100+ const requestOptions : FetchRequestOptions = {
101101 method : options . method || 'GET' ,
102102 headers : options . headers ,
103103 } ;
@@ -136,7 +136,7 @@ export class ApiClient {
136136
137137 private async doFetchRequest (
138138 url : URL ,
139- requestOptions : FetchRequestInit ,
139+ requestOptions : FetchRequestOptions ,
140140 responseEncoding : BufferEncoding | null
141141 ) : Promise < ApiResult > {
142142 const fetcher = this . getFetch ( ) ;
You can’t perform that action at this time.
0 commit comments