diff options
author | Trivikram Kamat <16024985+trivikr@users.noreply.github.com> | 2020-07-26 07:41:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-26 10:41:10 -0400 |
commit | 35a1421fb1b8407a13e33081ad2dbc05460e7452 (patch) | |
tree | 67693177bccdf783a73e053143bf2cf63deea082 /std/node/_util/_util_promisify_test.ts | |
parent | 9f3ab4dca7ed5c810352b67fce24aa800defc5a6 (diff) |
chore: use ts-expect-error instead of ts-ignore (#6876)
Diffstat (limited to 'std/node/_util/_util_promisify_test.ts')
-rw-r--r-- | std/node/_util/_util_promisify_test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/std/node/_util/_util_promisify_test.ts b/std/node/_util/_util_promisify_test.ts index 5148bc609..67ca6af58 100644 --- a/std/node/_util/_util_promisify_test.ts +++ b/std/node/_util/_util_promisify_test.ts @@ -43,7 +43,7 @@ Deno.test("Promisify.custom", async function testPromisifyCustom() { function fn(): void {} function promisifedFn(): void {} - // @ts-ignore TypeScript (as of 3.7) does not support indexing namespaces by symbol + // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol fn[promisify.custom] = promisifedFn; const promisifiedFnA = promisify(fn); @@ -63,7 +63,7 @@ Deno.test("promiisfy.custom symbol", function testPromisifyCustomSymbol() { // util.promisify.custom is a shared symbol which can be accessed // as `Symbol.for("nodejs.util.promisify.custom")`. const kCustomPromisifiedSymbol = Symbol.for("nodejs.util.promisify.custom"); - // @ts-ignore TypeScript (as of 3.7) does not support indexing namespaces by symbol + // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol fn[kCustomPromisifiedSymbol] = promisifiedFn; assertStrictEquals(kCustomPromisifiedSymbol, promisify.custom); @@ -73,7 +73,7 @@ Deno.test("promiisfy.custom symbol", function testPromisifyCustomSymbol() { Deno.test("Invalid argument should throw", function testThrowInvalidArgument() { function fn(): void {} - // @ts-ignore TypeScript (as of 3.7) does not support indexing namespaces by symbol + // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol fn[promisify.custom] = 42; try { promisify(fn); @@ -91,7 +91,7 @@ Deno.test("Custom promisify args", async function testPromisifyCustomArgs() { callback(null, firstValue, secondValue); } - // @ts-ignore TypeScript (as of 3.7) does not support indexing namespaces by symbol + // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol fn[customPromisifyArgs] = ["first", "second"]; const obj = await promisify(fn)(); @@ -159,7 +159,7 @@ Deno.test( Deno.test("Rejected value", async function testPromisifyWithAsObjectMethod() { const o: { fn?: Function } = {}; const fn = promisify(function (cb: Function): void { - // @ts-ignore TypeScript + // @ts-expect-error TypeScript cb(null, this === o); }); @@ -220,7 +220,7 @@ Deno.test("Test error", async function testInvalidArguments() { Deno.test("Test invalid arguments", function testInvalidArguments() { [undefined, null, true, 0, "str", {}, [], Symbol()].forEach((input) => { try { - // @ts-ignore TypeScript + // @ts-expect-error TypeScript promisify(input); } catch (e) { assertStrictEquals(e.code, "ERR_INVALID_ARG_TYPE"); |