From 6323ab865a11cf511d00f67855ec94ce6c208659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20I=2E=20Silva?= Date: Fri, 4 Jan 2019 01:23:31 -0800 Subject: [PATCH] add `types` attribute and a few more types --- index.d.ts | 7 +++++++ package.json | 1 + 2 files changed, 8 insertions(+) diff --git a/index.d.ts b/index.d.ts index 49e7eb5..9384be3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,11 @@ export default class FakeXMLHttpRequest extends XMLHttpRequest { + method: string; + url: string; + async: boolean; + username: string; + password: string; + requestHeaders: Object; + /* Forces a response on to the FakeXMLHttpRequest object. diff --git a/package.json b/package.json index 144807a..624d49a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "test infrastructure for a fake XMLHttpRequest object", "main": "fake_xml_http_request.js", "module": "./src/fake-xml-http-request.js", + "types": "index.d.ts", "repository": "https://github.com/trek/FakeXMLHttpRequest.git", "scripts": { "test": "esperanto -i src/fake-xml-http-request.js -t umd -b -n FakeXMLHttpRequest -o fake_xml_http_request.js && ./node_modules/karma/bin/karma start --single-run --browsers PhantomJS"