2020-03-05 16:37:36 +01:00
|
|
|
// @ts-expect-error additional commenting
|
|
|
|
var invalidCommentedFancy: number = 'nope';
|
|
|
|
|
|
|
|
// @ts-expect-error additional commenting
|
|
|
|
var validCommentedFancy: string = 'nope';
|
|
|
|
|
|
|
|
// @ts-expect-error
|
|
|
|
var invalidCommentedPlain: number = 'nope';
|
|
|
|
|
|
|
|
// @ts-expect-error
|
|
|
|
var validCommentedPlain: string = 'nope';
|
|
|
|
|
|
|
|
var invalidPlain: number = 'nope';
|
|
|
|
|
|
|
|
var validPlain: string = 'nope';
|
2020-05-04 22:02:54 +02:00
|
|
|
|
|
|
|
// @ts-expect-error
|
|
|
|
(({ a: true } as const).a === false); // <-- compiles (as expected via comment)
|
|
|
|
(({ a: true } as const).a === false); // Should error
|
|
|
|
|
|
|
|
(({ a: true } as const).a === false); // error
|
|
|
|
(({ a: true } as const).a === false); // error
|