File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ declare module 'replicate' {
6969
7070 export type Training = Prediction ;
7171
72- interface Page < T > {
72+ export interface Page < T > {
7373 previous ?: string ;
7474 next ?: string ;
7575 results : T [ ] ;
@@ -80,13 +80,13 @@ declare module 'replicate' {
8080 auth ?: string ;
8181 userAgent ?: string ;
8282 baseUrl ?: string ;
83- fetch ?: Function ;
83+ fetch ?: ( input : Request | string , init ?: RequestInit ) => Promise < Response >
8484 } ) ;
8585
8686 auth : string ;
8787 userAgent ?: string ;
8888 baseUrl ?: string ;
89- fetch : Function ;
89+ fetch : ( input : Request | string , init ?: RequestInit ) => Promise < Response >
9090
9191 run (
9292 identifier : `${string } /${string } ` | `${string } /${string } :${string } `,
Original file line number Diff line number Diff line change @@ -188,9 +188,9 @@ class Replicate {
188188 data,
189189 } = options ;
190190
191- Object . entries ( params ) . forEach ( ( [ key , value ] ) => {
191+ for ( const [ key , value ] of Object . entries ( params ) ) {
192192 url . searchParams . append ( key , value ) ;
193- } ) ;
193+ }
194194
195195 const headers = new Headers ( ) ;
196196 if ( auth ) {
@@ -199,9 +199,9 @@ class Replicate {
199199 headers . append ( 'Content-Type' , 'application/json' ) ;
200200 headers . append ( 'User-Agent' , userAgent ) ;
201201 if ( options . headers ) {
202- options . headers . forEach ( ( value , key ) => {
202+ for ( const [ key , value ] of options . headers . entries ( ) ) {
203203 headers . append ( key , value ) ;
204- } ) ;
204+ }
205205 }
206206
207207 const init = {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const BASE_URL = 'https://api.replicate.com/v1';
99nock . disableNetConnect ( ) ;
1010
1111describe ( 'Replicate client' , ( ) => {
12- let unmatched : Object [ ] = [ ] ;
12+ let unmatched : any [ ] = [ ] ;
1313 const handleNoMatch = ( req : unknown , options : any , body : string ) =>
1414 unmatched . push ( { req, options, body } ) ;
1515
You can’t perform that action at this time.
0 commit comments