Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions types/nise/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export interface FakeXMLHttpRequest {
* When using respond, this property is populated with a parsed document if response headers indicate as much (see the spec)
*/
responseXML: Document;
/**
* `true` when the request has been aborted, `false` or undefined otherwise
*/
aborted: boolean;
/**
* The value of the given response header, if the request has been responded to (see respond).
* @param header
Expand Down
3 changes: 3 additions & 0 deletions types/nise/nise-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function testFakeXMLHttpRequest() {
xhr.setStatus(404);
xhr.respond(200, { Accept: "application/json" }, "body");
xhr.error();

// $ExpectType boolean
xhr.aborted;
}

function testFakeXMLHttpRequestStatic() {
Expand Down