Skip to content
Open
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: 2 additions & 2 deletions _tools/check_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function assertHasParamTag(
);
if (tag === undefined) return;
assert(
// @ts-ignore doc is defined
// @ts-expect-error doc is defined
tag.doc !== undefined,
`@param tag for ${param} must have a description`,
document,
Expand Down Expand Up @@ -205,7 +205,7 @@ function assertHasTypeParamTags(
);
if (tag === undefined) return;
assert(
// @ts-ignore doc is defined
// @ts-expect-error doc is defined
tag.doc !== undefined,
`@typeParam tag for ${typeParamName} must have a description`,
document,
Expand Down
2 changes: 1 addition & 1 deletion collections/includes_value_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Deno.test("includesValue() handles NaN value", () => {

Deno.test("includesValue() prevents enumerable prototype check", () => {
class Foo {}
// @ts-ignore: for test
// @ts-expect-error: for test
Foo.prototype.a = "hello";
const input = new Foo() as Record<string, string>;

Expand Down
4 changes: 2 additions & 2 deletions collections/sliding_windows_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ Deno.test({
"Cannot create sliding windows: step must be a positive integer, current value is NaN",
);
slidingWindowsThrowsTest(
// @ts-ignore: for test
// @ts-expect-error: for test
[[1, 2, 3, 4, 5], "invalid"],
RangeError,
"Cannot create sliding windows: size must be a positive integer, current value is invalid",
);
slidingWindowsThrowsTest(
// @ts-ignore: for test
// @ts-expect-error: for test
[[1, 2, 3, 4, 5], 3, { step: "invalid" }],
RangeError,
"Cannot create sliding windows: step must be a positive integer, current value is invalid",
Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ Deno.test("digest() throws on invalid algorithm", async () => {
// runtime and its wording differs across versions (e.g. "Unrecognized
// algorithm name" vs. "Algorithm 'invalid' is not supported").
await assertRejects(
// @ts-ignore Algorithm name is invalid on purpose
// @ts-expect-error Algorithm name is invalid on purpose
async () => await stdCrypto.subtle.digest("invalid", new Uint8Array(0)),
DOMException,
);
Expand Down
8 changes: 4 additions & 4 deletions csv/unstable_stringify_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Deno.test("(unstable) stringify", async (t) => {
const options = { columns: true };
const data = [{ a: 1 }];
assertThrows(
// @ts-ignore: for test
// @ts-expect-error: for test
() => stringify(data, options),
"Cannot stringify data as the columns option is invalid: columns must be an array or undefined",
);
Expand All @@ -52,7 +52,7 @@ Deno.test("(unstable) stringify", async (t) => {
const options = { columns: { v: true } };
const data = [{ a: 1 }];
assertThrows(
// @ts-ignore: for test
// @ts-expect-error: for test
() => stringify(data, options),
"Cannot stringify data as the columns option is invalid: columns must be an array or undefined",
);
Expand All @@ -67,7 +67,7 @@ Deno.test("(unstable) stringify", async (t) => {
const options = { columns: 127 };
const data = [{ a: 1 }];
assertThrows(
// @ts-ignore: for test
// @ts-expect-error: for test
() => stringify(data, options),
"Cannot stringify data as the columns option is invalid: columns must be an array or undefined",
);
Expand All @@ -82,7 +82,7 @@ Deno.test("(unstable) stringify", async (t) => {
const options = { columns: "i am a string" };
const data = [{ a: 1 }];
assertThrows(
// @ts-ignore: for test
// @ts-expect-error: for test
() => stringify(data, options),
"Cannot stringify data as the columns option is invalid: columns must be an array or undefined",
);
Expand Down
6 changes: 3 additions & 3 deletions random/_test_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function mockLittleEndian(littleEndian: boolean) {
const TypedArray = globalThis[`${type}Array`];

const MockTypedArray = class extends TypedArray {
// @ts-ignore missing super() call
// @ts-expect-error missing super() call
constructor(...args: any[]) {
const target = new TypedArray(...args);
const dv = new DataView(
Expand Down Expand Up @@ -101,11 +101,11 @@ export function mockLittleEndian(littleEndian: boolean) {
}
};

// @ts-ignore mock
// @ts-expect-error mock
globalThis[`${type}Array`] = MockTypedArray;

stack.defer(() => {
// @ts-ignore restore mock
// @ts-expect-error restore mock
globalThis[`${type}Array`] = TypedArray;
});
}
Expand Down
2 changes: 1 addition & 1 deletion testing/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ function constructorSpy<
): ConstructorSpy<Self, Args> {
const original = constructor;
const calls: SpyCall<Self, Args, Self>[] = [];
// @ts-ignore TS2509: Can't know the type of `original` statically.
// @ts-expect-error TS2509: Can't know the type of `original` statically.
const spy = class extends original {
// deno-lint-ignore constructor-super
constructor(...args: Args) {
Expand Down
4 changes: 2 additions & 2 deletions text/unstable_dedent_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Deno.test("dedent() handles multiline substitution", () => {
});

Deno.test("dedent() handles mixed tabs and spaces", async (t) => {
// @ts-ignore augmenting globalThis so we don't need to resort to bare `eval`
// @ts-expect-error augmenting globalThis so we don't need to resort to bare `eval`
using _ = stub(globalThis, "dedent", dedent);

await t.step("with partial common prefix", () => {
Expand All @@ -109,7 +109,7 @@ Deno.test("dedent() handles mixed tabs and spaces", async (t) => {
});

Deno.test("dedent() handles blank lines correctly", async (t) => {
// @ts-ignore augmenting globalThis so we don't need to resort to bare `eval`
// @ts-expect-error augmenting globalThis so we don't need to resort to bare `eval`
using _ = stub(globalThis, "dedent", dedent);

for (const lineEnding of ["\n", "\r\n"]) {
Expand Down
Loading