Files
tsgo/testdata/baselines/reference/tsc/contentMapperSynthesized/diagnostics-in-synthesized-code-render-on-the-virtual-text.js
2026-08-19 20:30:48 +00:00

2.2 KiB

currentDirectory::/home/src/workspaces/project
useCaseSensitiveFileNames::true
Input::
//// [/home/src/workspaces/project/app.vue] *new*
<template>
<Widget />
</template>
//// [/home/src/workspaces/project/index.ts] *new*
import "./app.vue";
//// [/home/src/workspaces/project/node_modules/synth/package.json] *new*
{
"name": "synth",
"version": "1.0.0",
"typescript": { "contentMapper": { "exec": ["synthesizing-mapper"] } }
}
//// [/home/src/workspaces/project/tsconfig.json] *new*
{
"contentMappers": [
{ "package": "synth", "extensions": [".vue"] }
]
}
 
tsgo --runExternalCode
ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
app.vue:1:19 - error TS2304: Cannot find name 'jsxRuntime'.
This location is in virtual code produced by the content mapper '[email protected]' and has no corresponding location in the original file.
 
1 export const el = jsxRuntime(Widget);
~~~~~~~~~~
 
app.vue:1:30 - error TS2304: Cannot find name 'Widget'.
This location is in virtual code produced by the content mapper '[email protected]' and has no corresponding location in the original file.
 
1 export const el = jsxRuntime(Widget);
~~~~~~
 
 
Found 2 errors in the same file, starting at: app.vue:1
 
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
/// <reference no-default-lib="true"/>
interface Boolean {}
interface Function {}
interface CallableFunction {}
interface NewableFunction {}
interface IArguments {}
interface Number { toExponential: any; }
interface Object {}
interface RegExp {}
interface String { charAt: any; }
interface Array<T> { length: number; [n: number]: T; }
interface ReadonlyArray<T> {}
interface SymbolConstructor {
(desc?: string | number): symbol;
for(name: string): symbol;
readonly toStringTag: symbol;
}
declare var Symbol: SymbolConstructor;
interface Symbol {
readonly [Symbol.toStringTag]: string;
}
declare const console: { log(msg: any): void; };
//// [/home/src/workspaces/project/index.js] *new*
import "./app.vue";