From bef6849dac841942c50bf175cc1eb89a5284f703 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Thu, 14 Sep 2017 22:27:52 +0200 Subject: [PATCH] Fix parse_response type and use lookup type --- types/needle/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/needle/index.d.ts b/types/needle/index.d.ts index cc3fa4ff32..491b782130 100644 --- a/types/needle/index.d.ts +++ b/types/needle/index.d.ts @@ -42,7 +42,7 @@ declare namespace core { /** * Alias for open_timeout */ - timeout?: number; + timeout?: RequestOptions['open_timeout']; /** * Returns error if data transfer takes longer than X milisecs, @@ -56,7 +56,7 @@ declare namespace core { /** * Alias for follow_max */ - follow?: number; + follow?: RequestOptions['follow_max']; /** * Enables multipart/form-data encoding. Defaults to false. @@ -155,7 +155,7 @@ declare namespace core { /** * Alias for decode_response */ - decode?: boolean; + decode?: ResponseOptions['decode_response']; /** * Whether to parse XML or JSON response bodies automagically. @@ -163,11 +163,11 @@ declare namespace core { * You can also set this to 'xml' or 'json' in which case Needle * will only parse the response if the content type matches. */ - parse_response?: boolean; + parse_response?: boolean | 'json' | 'xml'; /** * Alias for parse_response */ - parse?: boolean; + parse?: ResponseOptions['parse_response']; /** * Whether to parse response’s Set-Cookie header.