|
| 1 | + |
| 2 | +currentDirectory::/home/src/workspaces/project |
| 3 | +useCaseSensitiveFileNames::true |
| 4 | +Input:: |
| 5 | +//// [/home/src/workspaces/project/index.tsx] new file |
| 6 | + |
| 7 | + declare namespace JSX { |
| 8 | + interface ElementChildrenAttribute { children: {}; } |
| 9 | + interface IntrinsicElements { div: {} } |
| 10 | + } |
| 11 | + |
| 12 | + declare var React: any; |
| 13 | + |
| 14 | + declare function Component(props: never): any; |
| 15 | + declare function Component(props: { children?: number }): any; |
| 16 | + (<Component> |
| 17 | + <div /> |
| 18 | + <div /> |
| 19 | + </Component>) |
| 20 | +//// [/home/src/workspaces/project/tsconfig.json] new file |
| 21 | +{ |
| 22 | + "compilerOptions": { |
| 23 | + "incremental": true, |
| 24 | + "strict": true, |
| 25 | + "jsx": "react", |
| 26 | + "module": "esnext", |
| 27 | + }, |
| 28 | + } |
| 29 | + |
| 30 | +ExitStatus:: 2 |
| 31 | + |
| 32 | +CompilerOptions::{} |
| 33 | +Output:: |
| 34 | +[96mindex.tsx[0m:[93m11[0m:[93m23[0m - [91merror[0m[90m TS2746: [0mThis JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided. |
| 35 | + |
| 36 | +[7m11[0m (<Component> |
| 37 | +[7m [0m [91m ~~~~~~~~~[0m |
| 38 | + |
| 39 | +[96mindex.tsx[0m:[93m11[0m:[93m23[0m - [91merror[0m[90m TS2769: [0mNo overload matches this call. |
| 40 | + The last overload gave the following error. |
| 41 | + This JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided. |
| 42 | + |
| 43 | +[7m11[0m (<Component> |
| 44 | +[7m [0m [91m ~~~~~~~~~[0m |
| 45 | + |
| 46 | + [96mindex.tsx[0m:[93m10[0m:[93m38[0m - The last overload is declared here. |
| 47 | + [7m10[0m declare function Component(props: { children?: number }): any; |
| 48 | + [7m [0m [96m ~~~~~~~~~[0m |
| 49 | + |
| 50 | + |
| 51 | +Found 2 errors in the same file, starting at: index.tsx[90m:11[0m |
| 52 | + |
| 53 | +//// [/home/src/workspaces/project/index.js] new file |
| 54 | +(React.createElement(Component, null, React.createElement("div", null), React.createElement("div", null))); |
| 55 | + |
| 56 | +//// [/home/src/workspaces/project/index.tsx] no change |
| 57 | +//// [/home/src/workspaces/project/tsconfig.json] no change |
| 58 | +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] new file |
| 59 | +{"Version":"FakeTSVersion","fileNames":["bundled:///libs/lib.d.ts","bundled:///libs/lib.es5.d.ts","bundled:///libs/lib.dom.d.ts","bundled:///libs/lib.webworker.importscripts.d.ts","bundled:///libs/lib.scripthost.d.ts","bundled:///libs/lib.decorators.d.ts","bundled:///libs/lib.decorators.legacy.d.ts","./index.tsx"],"fileInfos":["a7297ff837fcdf174a9524925966429eb8e5feecc2cc55cc06574e6b092c1eaa",{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"c7980af975245f04431574a9c187c9abd1c0ba29d83a127ad2af4b952296f935","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":3,"module":99,"strict":true},"semanticDiagnosticsPerFile":[[8,[{"pos":426,"end":435,"code":2746,"category":1,"message":"This JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided."},{"pos":426,"end":435,"code":2769,"category":1,"message":"No overload matches this call.","messageChain":[{"pos":426,"end":435,"code":2770,"category":1,"message":"The last overload gave the following error.","messageChain":[{"pos":426,"end":435,"code":2746,"category":1,"message":"This JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided."}]}],"relatedInformation":[{"pos":358,"end":367,"code":2771,"category":1,"message":"The last overload is declared here."}]}]]]} |
| 60 | +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] new file |
| 61 | +{ |
| 62 | + "Version": "FakeTSVersion", |
| 63 | + "fileNames": [ |
| 64 | + "bundled:///libs/lib.d.ts", |
| 65 | + "bundled:///libs/lib.es5.d.ts", |
| 66 | + "bundled:///libs/lib.dom.d.ts", |
| 67 | + "bundled:///libs/lib.webworker.importscripts.d.ts", |
| 68 | + "bundled:///libs/lib.scripthost.d.ts", |
| 69 | + "bundled:///libs/lib.decorators.d.ts", |
| 70 | + "bundled:///libs/lib.decorators.legacy.d.ts", |
| 71 | + "./index.tsx" |
| 72 | + ], |
| 73 | + "fileInfos": [ |
| 74 | + { |
| 75 | + "fileName": "bundled:///libs/lib.d.ts", |
| 76 | + "version": "a7297ff837fcdf174a9524925966429eb8e5feecc2cc55cc06574e6b092c1eaa", |
| 77 | + "signature": "a7297ff837fcdf174a9524925966429eb8e5feecc2cc55cc06574e6b092c1eaa", |
| 78 | + "impliedNodeFormat": "CommonJS" |
| 79 | + }, |
| 80 | + { |
| 81 | + "fileName": "bundled:///libs/lib.es5.d.ts", |
| 82 | + "version": "69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546", |
| 83 | + "signature": "69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546", |
| 84 | + "affectsGlobalScope": true, |
| 85 | + "impliedNodeFormat": "CommonJS", |
| 86 | + "original": { |
| 87 | + "version": "69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546", |
| 88 | + "affectsGlobalScope": true, |
| 89 | + "impliedNodeFormat": 1 |
| 90 | + } |
| 91 | + }, |
| 92 | + { |
| 93 | + "fileName": "bundled:///libs/lib.dom.d.ts", |
| 94 | + "version": "092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763", |
| 95 | + "signature": "092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763", |
| 96 | + "affectsGlobalScope": true, |
| 97 | + "impliedNodeFormat": "CommonJS", |
| 98 | + "original": { |
| 99 | + "version": "092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763", |
| 100 | + "affectsGlobalScope": true, |
| 101 | + "impliedNodeFormat": 1 |
| 102 | + } |
| 103 | + }, |
| 104 | + { |
| 105 | + "fileName": "bundled:///libs/lib.webworker.importscripts.d.ts", |
| 106 | + "version": "80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89", |
| 107 | + "signature": "80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89", |
| 108 | + "affectsGlobalScope": true, |
| 109 | + "impliedNodeFormat": "CommonJS", |
| 110 | + "original": { |
| 111 | + "version": "80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89", |
| 112 | + "affectsGlobalScope": true, |
| 113 | + "impliedNodeFormat": 1 |
| 114 | + } |
| 115 | + }, |
| 116 | + { |
| 117 | + "fileName": "bundled:///libs/lib.scripthost.d.ts", |
| 118 | + "version": "cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573", |
| 119 | + "signature": "cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573", |
| 120 | + "affectsGlobalScope": true, |
| 121 | + "impliedNodeFormat": "CommonJS", |
| 122 | + "original": { |
| 123 | + "version": "cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573", |
| 124 | + "affectsGlobalScope": true, |
| 125 | + "impliedNodeFormat": 1 |
| 126 | + } |
| 127 | + }, |
| 128 | + { |
| 129 | + "fileName": "bundled:///libs/lib.decorators.d.ts", |
| 130 | + "version": "8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea", |
| 131 | + "signature": "8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea", |
| 132 | + "affectsGlobalScope": true, |
| 133 | + "impliedNodeFormat": "CommonJS", |
| 134 | + "original": { |
| 135 | + "version": "8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea", |
| 136 | + "affectsGlobalScope": true, |
| 137 | + "impliedNodeFormat": 1 |
| 138 | + } |
| 139 | + }, |
| 140 | + { |
| 141 | + "fileName": "bundled:///libs/lib.decorators.legacy.d.ts", |
| 142 | + "version": "782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538", |
| 143 | + "signature": "782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538", |
| 144 | + "affectsGlobalScope": true, |
| 145 | + "impliedNodeFormat": "CommonJS", |
| 146 | + "original": { |
| 147 | + "version": "782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538", |
| 148 | + "affectsGlobalScope": true, |
| 149 | + "impliedNodeFormat": 1 |
| 150 | + } |
| 151 | + }, |
| 152 | + { |
| 153 | + "fileName": "./index.tsx", |
| 154 | + "version": "c7980af975245f04431574a9c187c9abd1c0ba29d83a127ad2af4b952296f935", |
| 155 | + "signature": "c7980af975245f04431574a9c187c9abd1c0ba29d83a127ad2af4b952296f935", |
| 156 | + "affectsGlobalScope": true, |
| 157 | + "impliedNodeFormat": "CommonJS", |
| 158 | + "original": { |
| 159 | + "version": "c7980af975245f04431574a9c187c9abd1c0ba29d83a127ad2af4b952296f935", |
| 160 | + "affectsGlobalScope": true, |
| 161 | + "impliedNodeFormat": 1 |
| 162 | + } |
| 163 | + } |
| 164 | + ], |
| 165 | + "options": { |
| 166 | + "jsx": 3, |
| 167 | + "module": 99, |
| 168 | + "strict": true |
| 169 | + }, |
| 170 | + "semanticDiagnosticsPerFile": [ |
| 171 | + [ |
| 172 | + "./index.tsx", |
| 173 | + [ |
| 174 | + { |
| 175 | + "pos": 426, |
| 176 | + "end": 435, |
| 177 | + "code": 2746, |
| 178 | + "category": 1, |
| 179 | + "message": "This JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided." |
| 180 | + }, |
| 181 | + { |
| 182 | + "pos": 426, |
| 183 | + "end": 435, |
| 184 | + "code": 2769, |
| 185 | + "category": 1, |
| 186 | + "message": "No overload matches this call.", |
| 187 | + "messageChain": [ |
| 188 | + { |
| 189 | + "pos": 426, |
| 190 | + "end": 435, |
| 191 | + "code": 2770, |
| 192 | + "category": 1, |
| 193 | + "message": "The last overload gave the following error.", |
| 194 | + "messageChain": [ |
| 195 | + { |
| 196 | + "pos": 426, |
| 197 | + "end": 435, |
| 198 | + "code": 2746, |
| 199 | + "category": 1, |
| 200 | + "message": "This JSX tag's 'children' prop expects a single child of type 'number | undefined', but multiple children were provided." |
| 201 | + } |
| 202 | + ] |
| 203 | + } |
| 204 | + ], |
| 205 | + "relatedInformation": [ |
| 206 | + { |
| 207 | + "pos": 358, |
| 208 | + "end": 367, |
| 209 | + "code": 2771, |
| 210 | + "category": 1, |
| 211 | + "message": "The last overload is declared here." |
| 212 | + } |
| 213 | + ] |
| 214 | + } |
| 215 | + ] |
| 216 | + ] |
| 217 | + ], |
| 218 | + "size": 2074 |
| 219 | +} |
| 220 | + |
0 commit comments