Files
tsgo/testdata/baselines/reference/compiler/jsxTernaryWithObjectInAttribute.errors.txt
235ae15b95 Fix JSX parsing failures in ternary expressions with nested JSX attributes (#2937)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jakebailey <[email protected]>
Co-authored-by: Ryan Cavanaugh <[email protected]>
2026-03-31 17:23:43 +00:00

63 lines
3.4 KiB
Plaintext

jsxTernaryWithObjectInAttribute.tsx(11,5): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(12,7): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(12,24): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(19,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(24,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(27,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(29,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
jsxTernaryWithObjectInAttribute.tsx(33,5): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
==== jsxTernaryWithObjectInAttribute.tsx (8 errors) ====
declare function memo<T>(f: T): T;
declare const HoverCardText: (p: { label: any; text: any; className?: string }) => null;
declare const DEFAULT_NULL_VALUE: string;
declare function t(key: string, params?: Record<string, any>): string;
declare function nf(v: any, opts: { precision: number; rounding: string }): string;
export const Example = memo(function Example() {
const isLogin = true;
return (
<div>
~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
<div>{t('label')}</div>
~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
~~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
{!isLogin ? (
DEFAULT_NULL_VALUE
) : (
<HoverCardText
className="test"
label={
<div>
~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
{t('some.key', {
s1: nf(1, { precision: 2, rounding: 'down' }),
s2: nf(2, { precision: 2, rounding: 'down' }),
})}
</div>
~~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
}
text={
<div>
~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
{nf(0, { precision: 2, rounding: 'down' })} USDT
</div>
~~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
}
></HoverCardText>
)}
</div>
~~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
);
});