MCPcopy Create free account
hub / github.com/nodejs/node / checkJsxPreconditions

Function checkJsxPreconditions

test/fixtures/snapshot/typescript.js:74203–74213  ·  view source on GitHub ↗
(errorNode)

Source from the content-addressed store, hash-verified

74201 return intrinsics ? getPropertiesOfType(intrinsics) : ts.emptyArray;
74202 }
74203 function checkJsxPreconditions(errorNode) {
74204 // Preconditions for using JSX
74205 if ((compilerOptions.jsx || 0 /* JsxEmit.None */) === 0 /* JsxEmit.None */) {
74206 error(errorNode, ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);
74207 }
74208 if (getJsxElementTypeAt(errorNode) === undefined) {
74209 if (noImplicitAny) {
74210 error(errorNode, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);
74211 }
74212 }
74213 }
74214 function checkJsxOpeningLikeElementOrOpeningFragment(node) {
74215 var isNodeOpeningLikeElement = ts.isJsxOpeningLikeElement(node);
74216 if (isNodeOpeningLikeElement) {

Calls 2

getJsxElementTypeAtFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected