summaryrefslogtreecommitdiff
path: root/std/node/_util/_util_promisify.ts
diff options
context:
space:
mode:
authorTrivikram Kamat <16024985+trivikr@users.noreply.github.com>2020-07-26 07:41:10 -0700
committerGitHub <noreply@github.com>2020-07-26 10:41:10 -0400
commit35a1421fb1b8407a13e33081ad2dbc05460e7452 (patch)
tree67693177bccdf783a73e053143bf2cf63deea082 /std/node/_util/_util_promisify.ts
parent9f3ab4dca7ed5c810352b67fce24aa800defc5a6 (diff)
chore: use ts-expect-error instead of ts-ignore (#6876)
Diffstat (limited to 'std/node/_util/_util_promisify.ts')
-rw-r--r--std/node/_util/_util_promisify.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/node/_util/_util_promisify.ts b/std/node/_util/_util_promisify.ts
index 9e86b5a09..4daba8b74 100644
--- a/std/node/_util/_util_promisify.ts
+++ b/std/node/_util/_util_promisify.ts
@@ -61,9 +61,9 @@ export function promisify(original: Function): Function {
throw new NodeInvalidArgTypeError("original", "Function", original);
}
- // @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
if (original[kCustomPromisifiedSymbol]) {
- // @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
const fn = original[kCustomPromisifiedSymbol];
if (typeof fn !== "function") {
throw new NodeInvalidArgTypeError(
@@ -82,12 +82,12 @@ export function promisify(original: Function): Function {
// Names to create an object from in case the callback receives multiple
// arguments, e.g. ['bytesRead', 'buffer'] for fs.read.
- // @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
const argumentNames = original[kCustomPromisifyArgsSymbol];
function fn(...args: unknown[]): Promise<unknown> {
return new Promise((resolve, reject) => {
- // @ts-ignore: 'this' implicitly has type 'any' because it does not have a type annotation
+ // @ts-expect-error: 'this' implicitly has type 'any' because it does not have a type annotation
original.call(this, ...args, (err: Error, ...values: unknown[]) => {
if (err) {
return reject(err);
@@ -95,7 +95,7 @@ export function promisify(original: Function): Function {
if (argumentNames !== undefined && values.length > 1) {
const obj = {};
for (let i = 0; i < argumentNames.length; i++) {
- // @ts-ignore TypeScript
+ // @ts-expect-error TypeScript
obj[argumentNames[i]] = values[i];
}
resolve(obj);