From 8493ee88249682866178a151cf649bbd8081fce0 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 30 Oct 2020 16:01:27 -0700 Subject: [PATCH] Add mroe incremental-affecting affixes to compiler options, add incremental test for changing jsxImportSource --- src/compiler/commandLineParser.ts | 2 + .../unittests/tscWatch/incremental.ts | 28 ++ ...ImportSource-option-changed-incremental.js | 248 +++++++++++++++ .../jsxImportSource-option-changed-watch.js | 285 ++++++++++++++++++ 4 files changed, 563 insertions(+) create mode 100644 tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-incremental.js create mode 100644 tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-watch.js diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 1698ee97a72..2c41ba05ffd 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -803,6 +803,8 @@ namespace ts { { name: "jsxImportSource", type: "string", + affectsSemanticDiagnostics: true, + affectsEmit: true, affectsModuleResolution: true, category: Diagnostics.Advanced_Options, description: Diagnostics.Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts index f4b7fa13ed4..5aca68f749d 100644 --- a/src/testRunner/unittests/tscWatch/incremental.ts +++ b/src/testRunner/unittests/tscWatch/incremental.ts @@ -276,5 +276,33 @@ export interface A { ], modifyFs: host => host.deleteFile(`${project}/globals.d.ts`) }); + + const jsxImportSourceOptions = { module: "commonjs", jsx: "react-jsx", incremental: true, jsxImportSource: "react" }; + const jsxLibraryContent = `export namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propA?: boolean; + }; + } +} +export function jsx(...args: any[]): void; +export function jsxs(...args: any[]): void; +export const Fragment: unique symbol; +`; + + verifyIncrementalWatchEmit({ + subScenario: "jsxImportSource option changed", + files: () => [ + { path: libFile.path, content: libContent }, + { path: `${project}/node_modules/react/jsx-runtime/index.d.ts`, content: jsxLibraryContent }, + { path: `${project}/node_modules/react/package.json`, content: JSON.stringify({ name: "react", version: "0.0.1" }) }, + { path: `${project}/node_modules/preact/jsx-runtime/index.d.ts`, content: jsxLibraryContent.replace("propA", "propB") }, + { path: `${project}/node_modules/preact/package.json`, content: JSON.stringify({ name: "preact", version: "0.0.1" }) }, + { path: `${project}/index.tsx`, content: `export const App = () =>
;` }, + { path: configFile.path, content: JSON.stringify({ compilerOptions: jsxImportSourceOptions }) } + ], + modifyFs: host => host.writeFile(configFile.path, JSON.stringify({ compilerOptions: { ...jsxImportSourceOptions, jsxImportSource: "preact" } })) + }); }); } diff --git a/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-incremental.js b/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-incremental.js new file mode 100644 index 00000000000..e75b1813ec9 --- /dev/null +++ b/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-incremental.js @@ -0,0 +1,248 @@ +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts] +export namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propA?: boolean; + }; + } +} +export function jsx(...args: any[]): void; +export function jsxs(...args: any[]): void; +export const Fragment: unique symbol; + + +//// [/users/username/projects/project/node_modules/react/package.json] +{"name":"react","version":"0.0.1"} + +//// [/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts] +export namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propB?: boolean; + }; + } +} +export function jsx(...args: any[]): void; +export function jsxs(...args: any[]): void; +export const Fragment: unique symbol; + + +//// [/users/username/projects/project/node_modules/preact/package.json] +{"name":"preact","version":"0.0.1"} + +//// [/users/username/projects/project/index.tsx] +export const App = () =>
; + +//// [/users/username/projects/project/tsconfig.json] +{"compilerOptions":{"module":"commonjs","jsx":"react-jsx","incremental":true,"jsxImportSource":"react"}} + + +/a/lib/tsc.js -i +Output:: + + +Program root files: ["/users/username/projects/project/index.tsx"] +Program options: {"module":1,"jsx":4,"incremental":true,"jsxImportSource":"react","configFilePath":"/users/username/projects/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts + +WatchedFiles:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.Success + +//// [/users/username/projects/project/index.js] +"use strict"; +exports.__esModule = true; +exports.App = void 0; +var jsx_runtime_1 = require("react/jsx-runtime"); +var App = function () { return jsx_runtime_1.jsx("div", { propA: true }, void 0); }; +exports.App = App; + + +//// [/users/username/projects/project/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./index.tsx": { + "version": "-14760199789-export const App = () =>
;", + "signature": "-17269688391-export declare const App: () => import(\"react/jsx-runtime\").JSX.Element;\n", + "affectsGlobalScope": false + }, + "./node_modules/react/jsx-runtime/index.d.ts": { + "version": "-35656056833-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "signature": "-35656056833-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "affectsGlobalScope": false + } + }, + "options": { + "module": 1, + "jsx": 4, + "incremental": true, + "jsxImportSource": "react", + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": { + "./index.tsx": [ + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./index.tsx", + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "version": "FakeTSVersion" +} + + +Change:: + +Input:: +//// [/users/username/projects/project/tsconfig.json] +{"compilerOptions":{"module":"commonjs","jsx":"react-jsx","incremental":true,"jsxImportSource":"preact"}} + + +Output:: +index.tsx:1:31 - error TS2322: Type '{ propA: boolean; }' is not assignable to type '{ propB?: boolean; }'. + Property 'propA' does not exist on type '{ propB?: boolean; }'. Did you mean 'propB'? + +1 export const App = () =>
; +   ~~~~~ + + +Found 1 error. + + + +Program root files: ["/users/username/projects/project/index.tsx"] +Program options: {"module":1,"jsx":4,"incremental":true,"jsxImportSource":"preact","configFilePath":"/users/username/projects/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts + +WatchedFiles:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + +//// [/users/username/projects/project/index.js] +"use strict"; +exports.__esModule = true; +exports.App = void 0; +var jsx_runtime_1 = require("preact/jsx-runtime"); +var App = function () { return jsx_runtime_1.jsx("div", { propA: true }, void 0); }; +exports.App = App; + + +//// [/users/username/projects/project/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./index.tsx": { + "version": "-14760199789-export const App = () =>
;", + "signature": "-17269688391-export declare const App: () => import(\"react/jsx-runtime\").JSX.Element;\n", + "affectsGlobalScope": false + }, + "./node_modules/preact/jsx-runtime/index.d.ts": { + "version": "-17896129664-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propB?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "signature": "-17896129664-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propB?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "affectsGlobalScope": false + } + }, + "options": { + "module": 1, + "jsx": 4, + "incremental": true, + "jsxImportSource": "preact", + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": { + "./index.tsx": [ + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.tsx", + [ + { + "file": "./index.tsx", + "start": 30, + "length": 5, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ propA: boolean; }' is not assignable to type '{ propB?: boolean; }'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Property 'propA' does not exist on type '{ propB?: boolean; }'. Did you mean 'propB'?", + "category": 1, + "code": 2551 + } + ] + } + } + ] + ], + "./node_modules/preact/jsx-runtime/index.d.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-watch.js b/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-watch.js new file mode 100644 index 00000000000..49bd165b3b1 --- /dev/null +++ b/tests/baselines/reference/tscWatch/incremental/jsxImportSource-option-changed-watch.js @@ -0,0 +1,285 @@ +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts] +export namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propA?: boolean; + }; + } +} +export function jsx(...args: any[]): void; +export function jsxs(...args: any[]): void; +export const Fragment: unique symbol; + + +//// [/users/username/projects/project/node_modules/react/package.json] +{"name":"react","version":"0.0.1"} + +//// [/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts] +export namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propB?: boolean; + }; + } +} +export function jsx(...args: any[]): void; +export function jsxs(...args: any[]): void; +export const Fragment: unique symbol; + + +//// [/users/username/projects/project/node_modules/preact/package.json] +{"name":"preact","version":"0.0.1"} + +//// [/users/username/projects/project/index.tsx] +export const App = () =>
; + +//// [/users/username/projects/project/tsconfig.json] +{"compilerOptions":{"module":"commonjs","jsx":"react-jsx","incremental":true,"jsxImportSource":"react"}} + + +/a/lib/tsc.js -w +Output:: +>> Screen clear +[12:00:39 AM] Starting compilation in watch mode... + +[12:00:44 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/users/username/projects/project/index.tsx"] +Program options: {"module":1,"jsx":4,"incremental":true,"jsxImportSource":"react","watch":true,"configFilePath":"/users/username/projects/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts + +WatchedFiles:: +/users/username/projects/project/tsconfig.json: + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} +/users/username/projects/project/index.tsx: + {"fileName":"/users/username/projects/project/index.tsx","pollingInterval":250} +/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts: + {"fileName":"/users/username/projects/project/node_modules/react/jsx-runtime/index.d.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/users/username/projects/project/node_modules: + {"directoryName":"/users/username/projects/project/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/users/username/projects/project/node_modules/@types: + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/users/username/projects/project: + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/users/username/projects/project/index.js] +"use strict"; +exports.__esModule = true; +exports.App = void 0; +var jsx_runtime_1 = require("react/jsx-runtime"); +var App = function () { return jsx_runtime_1.jsx("div", { propA: true }, void 0); }; +exports.App = App; + + +//// [/users/username/projects/project/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./index.tsx": { + "version": "-14760199789-export const App = () =>
;", + "signature": "-17269688391-export declare const App: () => import(\"react/jsx-runtime\").JSX.Element;\n", + "affectsGlobalScope": false + }, + "./node_modules/react/jsx-runtime/index.d.ts": { + "version": "-35656056833-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "signature": "-35656056833-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "affectsGlobalScope": false + } + }, + "options": { + "module": 1, + "jsx": 4, + "incremental": true, + "jsxImportSource": "react", + "watch": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": { + "./index.tsx": [ + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./index.tsx", + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "version": "FakeTSVersion" +} + + +Change:: + +Input:: +//// [/users/username/projects/project/tsconfig.json] +{"compilerOptions":{"module":"commonjs","jsx":"react-jsx","incremental":true,"jsxImportSource":"preact"}} + + +Output:: +>> Screen clear +[12:00:48 AM] Starting compilation in watch mode... + +index.tsx:1:31 - error TS2322: Type '{ propA: boolean; }' is not assignable to type '{ propB?: boolean; }'. + Property 'propA' does not exist on type '{ propB?: boolean; }'. Did you mean 'propB'? + +1 export const App = () =>
; +   ~~~~~ + +[12:00:55 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/users/username/projects/project/index.tsx"] +Program options: {"module":1,"jsx":4,"incremental":true,"jsxImportSource":"preact","watch":true,"configFilePath":"/users/username/projects/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/users/username/projects/project/index.tsx +/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts + +WatchedFiles:: +/users/username/projects/project/tsconfig.json: + {"fileName":"/users/username/projects/project/tsconfig.json","pollingInterval":250} +/users/username/projects/project/index.tsx: + {"fileName":"/users/username/projects/project/index.tsx","pollingInterval":250} +/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts: + {"fileName":"/users/username/projects/project/node_modules/preact/jsx-runtime/index.d.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/users/username/projects/project/node_modules: + {"directoryName":"/users/username/projects/project/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/users/username/projects/project/node_modules/@types: + {"directoryName":"/users/username/projects/project/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/users/username/projects/project: + {"directoryName":"/users/username/projects/project","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/users/username/projects/project/index.js] +"use strict"; +exports.__esModule = true; +exports.App = void 0; +var jsx_runtime_1 = require("preact/jsx-runtime"); +var App = function () { return jsx_runtime_1.jsx("div", { propA: true }, void 0); }; +exports.App = App; + + +//// [/users/username/projects/project/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./index.tsx": { + "version": "-14760199789-export const App = () =>
;", + "signature": "-17269688391-export declare const App: () => import(\"react/jsx-runtime\").JSX.Element;\n", + "affectsGlobalScope": false + }, + "./node_modules/preact/jsx-runtime/index.d.ts": { + "version": "-17896129664-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propB?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "signature": "-17896129664-export namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propB?: boolean;\n };\n }\n}\nexport function jsx(...args: any[]): void;\nexport function jsxs(...args: any[]): void;\nexport const Fragment: unique symbol;\n", + "affectsGlobalScope": false + } + }, + "options": { + "module": 1, + "jsx": 4, + "incremental": true, + "jsxImportSource": "preact", + "watch": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": { + "./index.tsx": [ + "./node_modules/react/jsx-runtime/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.tsx", + [ + { + "file": "./index.tsx", + "start": 30, + "length": 5, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ propA: boolean; }' is not assignable to type '{ propB?: boolean; }'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Property 'propA' does not exist on type '{ propB?: boolean; }'. Did you mean 'propB'?", + "category": 1, + "code": 2551 + } + ] + } + } + ] + ], + "./node_modules/preact/jsx-runtime/index.d.ts" + ] + }, + "version": "FakeTSVersion" +} +