diff --git a/package.json b/package.json index 38900eb..889a72e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-superfetch", - "version": "0.2.0", + "version": "0.2.1", "description": "A wrapper for node-fetch that makes it appear like superagent.", "main": "index.js", "typings": "typings/index.d.ts", diff --git a/typings/index.d.ts b/typings/index.d.ts index 70e772a..63dd591 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -11,6 +11,7 @@ interface RequestOptions { body?: RequestBody; redirects?: number; agent?: Agent; + noResultData?: Boolean } type ResponseBody = object | string | Buffer; @@ -20,9 +21,9 @@ interface Response { headers: KVObject; url: string; ok: boolean; - raw: Buffer; - text: string; - body: ResponseBody; + raw: Buffer | null; + text: string | null; + body: ResponseBody | null; } type StaticRequest = (url: string, options?: RequestOptions) => Request;