mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 13:15:16 +00:00
Use ts-expect-error instead of ts-ignore. (#5869)
This commit is contained in:
parent
24c36fd862
commit
228f9c207f
34 changed files with 81 additions and 94 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue