Mark jsxFactorySymbol as referenced for noUnusedLocals even in verbatimModuleSyntax (#59193)

This commit is contained in:
Andrew Branch 2024-07-16 13:46:38 -07:00 committed by GitHub
parent 003221becb
commit 0206f9fa6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View File

@ -33322,7 +33322,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
checkJsxPreconditions(node);
markLinkedReferences(node, ReferenceHint.Jsx);
markJsxAliasReferenced(node);
if (isNodeOpeningLikeElement) {
const jsxOpeningLikeNode = node;

View File

@ -0,0 +1,14 @@
// @module: preserve
// @verbatimModuleSyntax: true
// @jsx: react
// @noEmit: true
// @noUnusedLocals: true
// @noTypesAndSymbols: true
// @Filename: react.d.ts
declare module 'react';
// @Filename: index.tsx
import React from 'react';
export const build = <div>hello </div>;