Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[superagent] remove dom typings #57641

Merged
merged 2 commits into from Dec 30, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions types/superagent/index.d.ts
Expand Up @@ -15,7 +15,6 @@
// TypeScript Version: 3.0

/// <reference types="node" />
/// <reference lib="dom" />

import * as fs from "fs";
import * as http from "http";
Expand Down Expand Up @@ -127,7 +126,7 @@ declare namespace request {
text: string;
type: string;
unauthorized: boolean;
xhr: XMLHttpRequest;
xhr: any;
redirects: string[];
}

Expand Down
6 changes: 3 additions & 3 deletions types/superagent/superagent-tests.ts
Expand Up @@ -219,7 +219,7 @@ request.get("http://example.com/search").retry(2, callback).end(callback);
})();

// Attaching files
const blob: Blob = new File([], "thor.png");
declare const blob: Blob;
request
.post("/upload")
.attach("avatar", "path/to/tobi.png", "user.png")
Expand Down Expand Up @@ -282,8 +282,8 @@ request
.get("/blob")
.responseType("blob")
.end((err, res) => {
assert(res.xhr instanceof XMLHttpRequest);
assert(res.xhr.response instanceof Blob);
alecgibson marked this conversation as resolved.
Show resolved Hide resolved
res.xhr; // $ExpectType any
res.xhr.response; // $ExpectType any
});

// HTTPS request, from: https://github.com/visionmedia/superagent/commit/6158efbf42cb93d77c1a70887284be783dd7dabe
Expand Down
3 changes: 1 addition & 2 deletions types/superagent/tsconfig.json
Expand Up @@ -2,8 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
Expand Down