Bläddra i källkod

Merge pull request #455 from alpha0010/patch-2

Fix errors in TypeScript typings
Travis Nuttall 4 år sedan
förälder
incheckning
ec791959fc
No account linked to committer's email address
1 ändrade filer med 8 tillägg och 5 borttagningar
  1. 8
    5
      index.d.ts

+ 8
- 5
index.d.ts Visa fil

356
      */
356
      */
357
     writeFile(path: string, data: string | number[], encoding?: Encoding): Promise<void>;
357
     writeFile(path: string, data: string | number[], encoding?: Encoding): Promise<void>;
358
 
358
 
359
-    appendFile(path: string, data: string | number[], encoding?: Encoding): Promise<void>;
359
+    appendFile(path: string, data: string | number[], encoding?: Encoding | "uri"): Promise<number>;
360
 
360
 
361
     /**
361
     /**
362
      * Wrapper method of readStream.
362
      * Wrapper method of readStream.
399
     DocumentDir: string;
399
     DocumentDir: string;
400
     CacheDir: string;
400
     CacheDir: string;
401
     PictureDir: string;
401
     PictureDir: string;
402
+    LibraryDir: string;
402
     MusicDir: string;
403
     MusicDir: string;
403
     MovieDir: string;
404
     MovieDir: string;
404
     DownloadDir: string;
405
     DownloadDir: string;
432
     onEnd(fn: () => void): void;
433
     onEnd(fn: () => void): void;
433
 }
434
 }
434
 
435
 
435
-type Encoding = "utf8" | "ascii" | "base64";
436
+export type Encoding = "utf8" | "ascii" | "base64";
436
 
437
 
437
 /* tslint:disable-next-line interface-name*/
438
 /* tslint:disable-next-line interface-name*/
438
 export interface IOSApi {
439
 export interface IOSApi {
606
 
607
 
607
 export interface RNFetchBlobResponseInfo {
608
 export interface RNFetchBlobResponseInfo {
608
     taskId: string;
609
     taskId: string;
609
-    state: number;
610
+    state: string;
610
     headers: any;
611
     headers: any;
612
+    redirects: string[];
611
     status: number;
613
     status: number;
612
     respType: "text" | "blob" | "" | "json";
614
     respType: "text" | "blob" | "" | "json";
613
     rnfbEncode: "path" | "base64" | "ascii" | "utf8";
615
     rnfbEncode: "path" | "base64" | "ascii" | "utf8";
616
+    timeout: boolean;
614
 }
617
 }
615
 
618
 
616
 export interface RNFetchBlobStream {
619
 export interface RNFetchBlobStream {
623
 }
626
 }
624
 
627
 
625
 export declare class RNFetchBlobStat {
628
 export declare class RNFetchBlobStat {
626
-    lastModified: string;
627
-    size: string;
629
+    lastModified: number;
630
+    size: number;
628
     type: "directory" | "file";
631
     type: "directory" | "file";
629
     path: string;
632
     path: string;
630
     filename: string;
633
     filename: string;