test(assert): change inert comments to @ts-expect-error directives (#6162)

This commit is contained in:
lionel-rowe 2024-10-31 22:07:48 +08:00 committed by GitHub
parent 6cc4f9fc44
commit 6637a2067a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,16 +27,14 @@ Deno.test({
const y = x as Record<never, never>; const y = x as Record<never, never>;
const z = x as unknown; const z = x as unknown;
// y.number; // @ts-expect-error Property 'number' does not exist on type 'Record<never, never>'.deno-ts(2339)
// ~~~~~~ y.number;
// Property 'number' does not exist on type 'Record<never, never>'.deno-ts(2339)
assertStrictEquals(y, x); assertStrictEquals(y, x);
y.number; // ok y.number; // ok
// z.number; // @ts-expect-error 'z' is of type 'unknown'.deno-ts(18046)
// ~ z.number;
// Object is of type 'unknown'.deno-ts(2571)
assertStrictEquals(z, x); assertStrictEquals(z, x);
z.number; // ok z.number; // ok