Use ts-expect-error instead of ts-ignore. (#5869)

This commit is contained in:
Kitson Kelly 2020-05-27 00:02:16 +10:00 committed by GitHub
parent 24c36fd862
commit 228f9c207f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 81 additions and 94 deletions

View file

@ -244,19 +244,19 @@ function prepareStackTrace(
}
)
.map((callSite): string => {
// @ts-ignore
// @ts-expect-error
error.__callSiteEvals.push(Object.freeze(evaluateCallSite(callSite)));
const isInternal =
callSite.getFileName()?.startsWith("$deno$") ?? false;
const string = callSiteToString(callSite, isInternal);
// @ts-ignore
// @ts-expect-error
error.__formattedFrames.push(string);
return ` at ${colors.stripColor(string)}`;
})
.join("\n");
// @ts-ignore
// @ts-expect-error
Object.freeze(error.__callSiteEvals);
// @ts-ignore
// @ts-expect-error
Object.freeze(error.__formattedFrames);
return errorString;
}