Files
tsgo/testdata/baselines/reference/compiler/contentMapperDiagnosticDirectives.contentmapper
2026-08-19 20:30:48 +00:00

69 lines
2.0 KiB
Plaintext

//// [/widget.box] (ScriptKind: ScriptKindTS, ContentMapper: [.box])
--- Original ---
// @box-ignore
const ignored: number = "wrong";
// @box-expect-error: Unused first expectation.
const expected: number = "wrong";
// @box-expect-error: Syntax errors do not satisfy expectations.
const syntaxError = ;
// @box-expect-error: Unused second expectation.
const valid: number = 1;
const visible: number = "wrong";
// @box-expect-error: Mapper diagnostics do not satisfy expectations.
export const broken = #{unterminated;
--- Transformed ---
const __VERSION = "1.0.0";
// @box-ignore
const ignored: number = "wrong";
// @box-expect-error: Unused first expectation.
const expected: number = "wrong";
// @box-expect-error: Syntax errors do not satisfy expectations.
const syntaxError = ;
// @box-expect-error: Unused second expectation.
const valid: number = 1;
const visible: number = "wrong";
// @box-expect-error: Mapper diagnostics do not satisfy expectations.
export const broken = undefined
=== Diagnostics ===
/widget.box:7:1 - error box2578: Syntax errors do not satisfy expectations.
7 // @box-expect-error: Syntax errors do not satisfy expectations.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/widget.box:10:1 - error box2578: Unused second expectation.
10 // @box-expect-error: Unused second expectation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/widget.box:8:21 - error TS1109: Expression expected.
8 const syntaxError = ;
~
/widget.box:13:7 - error TS2322: Type 'string' is not assignable to type 'number'.
13 const visible: number = "wrong";
~~~~~~~
/widget.box:15:1 - error box2578: Mapper diagnostics do not satisfy expectations.
15 // @box-expect-error: Mapper diagnostics do not satisfy expectations.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/widget.box:16:23 - error box1000: Unclosed interpolation.
16 export const broken = #{unterminated;
~~~~~~~~~~~~~~~