Different parser functions signatures for browser and node.

This commit is contained in:
Shrey Jain
2018-01-22 10:28:54 -05:00
committed by GitHub
parent 59cc968668
commit b6c91649b4
+5 -1
View File
@@ -17,7 +17,11 @@ type CallbackHandler = (err: any, res: request.Response) => void;
type Serializer = (obj: any) => string;
type Parser = (res: request.Response, callback: (err: Error | null, body: any) => void) => void;
type BrowserParser = (str: string) => any;
type NodeParser = (res: request.Response, callback: (err: Error | null, body: any) => void) => void;
type Parser = BrowserParser | NodeParser;
type MultipartValueSingle = Blob | Buffer | fs.ReadStream | string | boolean | number;