summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/http/server_test.ts1
-rw-r--r--std/mime/multipart_test.ts2
-rw-r--r--std/node/global.ts2
-rw-r--r--std/node/module.ts14
-rw-r--r--std/signal/test.ts2
-rw-r--r--std/uuid/tests/isNil.ts1
-rw-r--r--std/ws/mod.ts2
7 files changed, 11 insertions, 13 deletions
diff --git a/std/http/server_test.ts b/std/http/server_test.ts
index 0560f7f8d..0423b8726 100644
--- a/std/http/server_test.ts
+++ b/std/http/server_test.ts
@@ -496,7 +496,6 @@ test({
async fn(): Promise<void> {
const serverRoutine = async (): Promise<void> => {
const server = serve(":8124");
- // @ts-ignore
for await (const req of server) {
await assertThrowsAsync(async () => {
await req.respond({
diff --git a/std/mime/multipart_test.ts b/std/mime/multipart_test.ts
index 61afdba03..b7c0cb969 100644
--- a/std/mime/multipart_test.ts
+++ b/std/mime/multipart_test.ts
@@ -145,7 +145,7 @@ test("multipartMultipartWriter3", async function (): Promise<void> {
);
await assertThrowsAsync(
async (): Promise<void> => {
- // @ts-ignore
+ // @ts-expect-error
await mw.writeFile("bar", "file", null);
},
Error,
diff --git a/std/node/global.ts b/std/node/global.ts
index c877d1d53..7d147cc4b 100644
--- a/std/node/global.ts
+++ b/std/node/global.ts
@@ -5,5 +5,5 @@ Object.defineProperty(globalThis, Symbol.toStringTag, {
configurable: true,
});
-// @ts-ignore
+// @ts-expect-error
globalThis["global"] = globalThis;
diff --git a/std/node/module.ts b/std/node/module.ts
index 4e0c55c1d..71c25beac 100644
--- a/std/node/module.ts
+++ b/std/node/module.ts
@@ -263,9 +263,9 @@ class Module {
message = message + "\nRequire stack:\n- " + requireStack.join("\n- ");
}
const err = new Error(message);
- // @ts-ignore
+ // @ts-expect-error
err.code = "MODULE_NOT_FOUND";
- // @ts-ignore
+ // @ts-expect-error
err.requireStack = requireStack;
throw err;
}
@@ -737,7 +737,7 @@ function tryPackage(
`Cannot find module '${filename}'. ` +
'Please verify that the package.json has a valid "main" entry'
);
- // @ts-ignore
+ // @ts-expect-error
err.code = "MODULE_NOT_FOUND";
throw err;
}
@@ -882,7 +882,7 @@ function applyExports(basePath: string, expansion: string): string {
`Package exports for '${basePath}' do not define ` +
`a '${mappingKey}' subpath`
);
- // @ts-ignore
+ // @ts-expect-error
e.code = "MODULE_NOT_FOUND";
throw e;
}
@@ -982,7 +982,7 @@ function resolveExportsTarget(
} else {
e = new Error(`No valid exports main found for '${basePath}'`);
}
- // @ts-ignore
+ // @ts-expect-error
e.code = "MODULE_NOT_FOUND";
throw e;
}
@@ -1007,7 +1007,7 @@ const CircularRequirePrototypeWarningProxy = new Proxy(
{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
get(target, prop): any {
- // @ts-ignore
+ // @ts-expect-error
if (prop in target) return target[prop];
emitCircularRequireWarning(prop);
return undefined;
@@ -1058,7 +1058,7 @@ type RequireWrapper = (
function wrapSafe(filename: string, content: string): RequireWrapper {
// TODO: fix this
const wrapper = Module.wrap(content);
- // @ts-ignore
+ // @ts-expect-error
const [f, err] = Deno.core.evalContext(wrapper, filename);
if (err) {
throw err;
diff --git a/std/signal/test.ts b/std/signal/test.ts
index 15ebbdcc7..13c2998db 100644
--- a/std/signal/test.ts
+++ b/std/signal/test.ts
@@ -9,7 +9,7 @@ test({
fn() {
assertThrows(
() => {
- // @ts-ignore
+ // @ts-expect-error
signal();
},
Error,
diff --git a/std/uuid/tests/isNil.ts b/std/uuid/tests/isNil.ts
index 4514576da..1f0db416e 100644
--- a/std/uuid/tests/isNil.ts
+++ b/std/uuid/tests/isNil.ts
@@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert } from "../../testing/asserts.ts";
const { test } = Deno;
-// @ts-ignore
import { NIL_UUID, isNil } from "../mod.ts";
test({
diff --git a/std/ws/mod.ts b/std/ws/mod.ts
index 324588af0..97c77baab 100644
--- a/std/ws/mod.ts
+++ b/std/ws/mod.ts
@@ -491,7 +491,7 @@ export async function handshake(
throw new Error("ws: invalid status line: " + statusLine);
}
- // @ts-ignore
+ // @ts-expect-error
const { version, statusCode } = m.groups;
if (version !== "HTTP/1.1" || statusCode !== "101") {
throw new Error(