From 1a85d7713142e0b9e517f11bbf6def3bc21cd761 Mon Sep 17 00:00:00 2001 From: Alex Regan Date: Wed, 28 Feb 2018 10:32:48 -0700 Subject: [PATCH] fix(xhr): stricter types for xhr headers and params --- src/upload-adapters/xhr.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/upload-adapters/xhr.ts b/src/upload-adapters/xhr.ts index 6a78306..da794bd 100644 --- a/src/upload-adapters/xhr.ts +++ b/src/upload-adapters/xhr.ts @@ -55,8 +55,8 @@ export type XHRUploadOptions = { * An object of additional parameters to transfer to the server. * This is the same as adding hidden input fields in the form element. */ - params?: { [key: string]: any }; - headers?: { [key: string]: any }; + params?: { [key: string]: string }; + headers?: { [key: string]: string }; /** * The XMLHttpRequest.responseType property is an enumerated value that * returns the type of response. It also lets the author change the response @@ -97,8 +97,8 @@ export class XHRUploadAdapter implements UploaderInterface { public withCredentials: boolean; public timeout: number; public paramName: string; - public params: AnyObject; - public headers: AnyObject; + public params: { [key: string]: string }; + public headers: { [key: string]: string }; public responseType: XMLHttpRequestResponseType; public errUploadError: (xhr: XMLHttpRequest) => string; public errUploadTimeout: (xhr: XMLHttpRequest) => string;