|
| 1 | +Input:: |
| 2 | +//// [/lib/lib.d.ts] |
| 3 | +/// <reference no-default-lib="true"/> |
| 4 | +interface Boolean {} |
| 5 | +interface Function {} |
| 6 | +interface CallableFunction {} |
| 7 | +interface NewableFunction {} |
| 8 | +interface IArguments {} |
| 9 | +interface Number { toExponential: any; } |
| 10 | +interface Object {} |
| 11 | +interface RegExp {} |
| 12 | +interface String { charAt: any; } |
| 13 | +interface Array<T> { length: number; [n: number]: T; } |
| 14 | +interface ReadonlyArray<T> {} |
| 15 | +declare const console: { log(msg: any): void; }; |
| 16 | + |
| 17 | +//// [/src/project/node_modules/@types/react/index.d.ts] |
| 18 | + |
| 19 | +export {}; |
| 20 | +declare global { |
| 21 | + namespace JSX { |
| 22 | + interface Element {} |
| 23 | + interface IntrinsicElements { |
| 24 | + div: { |
| 25 | + propA?: boolean; |
| 26 | + }; |
| 27 | + } |
| 28 | + } |
| 29 | +} |
| 30 | + |
| 31 | +//// [/src/project/node_modules/react/jsx-runtime.js] |
| 32 | + |
| 33 | + |
| 34 | +//// [/src/project/src/index.tsx] |
| 35 | +export const App = () => <div propA={true}></div>; |
| 36 | + |
| 37 | +//// [/src/project/tsconfig.json] |
| 38 | +{"compilerOptions":{"module":"commonjs","jsx":"react-jsx","incremental":true,"jsxImportSource":"react"}} |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +Output:: |
| 43 | +/lib/tsc --p src/project --strict |
| 44 | +[96msrc/project/src/index.tsx[0m:[93m1[0m:[93m26[0m - [91merror[0m[90m TS7016: [0mCould not find a declaration file for module 'react/jsx-runtime'. '/src/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type. |
| 45 | + |
| 46 | +[7m1[0m export const App = () => <div propA={true}></div>; |
| 47 | +[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~[0m |
| 48 | + |
| 49 | + |
| 50 | +Found 1 error. |
| 51 | + |
| 52 | +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated |
| 53 | + |
| 54 | + |
| 55 | +//// [/src/project/src/index.js] |
| 56 | +"use strict"; |
| 57 | +exports.__esModule = true; |
| 58 | +exports.App = void 0; |
| 59 | +var jsx_runtime_1 = require("react/jsx-runtime"); |
| 60 | +var App = function () { return jsx_runtime_1.jsx("div", { propA: true }, void 0); }; |
| 61 | +exports.App = App; |
| 62 | + |
| 63 | + |
| 64 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 65 | +{ |
| 66 | + "program": { |
| 67 | + "fileInfos": { |
| 68 | + "../../lib/lib.d.ts": { |
| 69 | + "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 70 | + "signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 71 | + "affectsGlobalScope": true |
| 72 | + }, |
| 73 | + "./src/index.tsx": { |
| 74 | + "version": "-14760199789-export const App = () => <div propA={true}></div>;", |
| 75 | + "signature": "-8716173275-/// <reference types=\"react\" />\r\nexport declare const App: () => JSX.Element;\r\n", |
| 76 | + "affectsGlobalScope": false |
| 77 | + }, |
| 78 | + "./node_modules/@types/react/index.d.ts": { |
| 79 | + "version": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", |
| 80 | + "signature": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", |
| 81 | + "affectsGlobalScope": true |
| 82 | + } |
| 83 | + }, |
| 84 | + "options": { |
| 85 | + "module": 1, |
| 86 | + "jsx": 4, |
| 87 | + "incremental": true, |
| 88 | + "jsxImportSource": "react", |
| 89 | + "project": "./", |
| 90 | + "strict": true, |
| 91 | + "configFilePath": "./tsconfig.json" |
| 92 | + }, |
| 93 | + "referencedMap": {}, |
| 94 | + "exportedModulesMap": {}, |
| 95 | + "semanticDiagnosticsPerFile": [ |
| 96 | + "../../lib/lib.d.ts", |
| 97 | + "./node_modules/@types/react/index.d.ts", |
| 98 | + [ |
| 99 | + "./src/index.tsx", |
| 100 | + [ |
| 101 | + { |
| 102 | + "file": "./src/index.tsx", |
| 103 | + "start": 25, |
| 104 | + "length": 24, |
| 105 | + "code": 7016, |
| 106 | + "category": 1, |
| 107 | + "messageText": "Could not find a declaration file for module 'react/jsx-runtime'. '/src/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type." |
| 108 | + } |
| 109 | + ] |
| 110 | + ] |
| 111 | + ] |
| 112 | + }, |
| 113 | + "version": "FakeTSVersion" |
| 114 | +} |
| 115 | + |
0 commit comments