1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ComponentProps {
>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
property1: string;
>property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 2, 26))
property2: number;
>property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 3, 22))
}
export default function Component(props: ComponentProps) {
>Component : Symbol(Component, Decl(file.tsx, 5, 1))
>props : Symbol(props, Decl(file.tsx, 7, 34))
>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
return (
// Error extra property
<AnotherComponent {...props} Property1/>
>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 16, 1))
>props : Symbol(props, Decl(file.tsx, 7, 34))
>Property1 : Symbol(Property1, Decl(file.tsx, 10, 36))
);
}
interface AnotherComponentProps {
>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
property1: string;
>property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 14, 33))
}
function AnotherComponent({ property1 }: AnotherComponentProps) {
>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 16, 1))
>property1 : Symbol(property1, Decl(file.tsx, 18, 27))
>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
return (
<span>{property1}</span>
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
>property1 : Symbol(property1, Decl(file.tsx, 18, 27))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
}
|