mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
// @ts-expect-error additional commenting
|
|
var invalidCommentedFancySingle: number = 'nope';
|
|
|
|
/*
|
|
@ts-expect-error additional commenting */
|
|
var invalidCommentedFancyMulti: number = 'nope';
|
|
|
|
// @ts-expect-error additional commenting
|
|
var validCommentedFancySingle: string = 'nope';
|
|
|
|
/* @ts-expect-error additional commenting */
|
|
var validCommentedFancyMulti: string = 'nope';
|
|
|
|
// @ts-expect-error
|
|
var invalidCommentedPlainSingle: number = 'nope';
|
|
|
|
/*
|
|
@ts-expect-error */
|
|
var invalidCommentedPlainMulti: number = 'nope';
|
|
|
|
// @ts-expect-error
|
|
var validCommentedPlainSingle: string = 'nope';
|
|
|
|
/* @ts-expect-error */
|
|
var validCommentedPlainMulti1: string = 'nope';
|
|
|
|
/*
|
|
@ts-expect-error */
|
|
var validCommentedPlainMulti2: string = 'nope';
|
|
|
|
var invalidPlain: number = 'nope';
|
|
|
|
var validPlain: string = 'nope';
|
|
|
|
// @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
|