Files
tsgo/testdata/baselines/reference/submodule/conformance/jsxSpreadOverwritesAttributeStrict.symbols

91 lines
3.0 KiB
Plaintext

//// [tests/cases/conformance/jsx/jsxSpreadOverwritesAttributeStrict.tsx] ////
=== file.tsx ===
/// <reference path="react.d.ts" />
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Props {
>Props : Symbol(Props, Decl(file.tsx, 2, 32))
a: number;
>a : Symbol(Props.a, Decl(file.tsx, 4, 17))
b: number;
>b : Symbol(Props.b, Decl(file.tsx, 5, 14))
c?: number;
>c : Symbol(Props.c, Decl(file.tsx, 6, 14))
d?: number;
>d : Symbol(Props.d, Decl(file.tsx, 7, 15))
}
const props: Props = { a: 1, b: 1 };
>props : Symbol(props, Decl(file.tsx, 12, 5))
>Props : Symbol(Props, Decl(file.tsx, 2, 32))
>a : Symbol(a, Decl(file.tsx, 12, 22))
>b : Symbol(b, Decl(file.tsx, 12, 28))
const Foo = (props: Props) => <div>{ props.a }</div>;
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>props : Symbol(props, Decl(file.tsx, 13, 13))
>Props : Symbol(Props, Decl(file.tsx, 2, 32))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2402, 45))
>props.a : Symbol(Props.a, Decl(file.tsx, 4, 17))
>props : Symbol(props, Decl(file.tsx, 13, 13))
>a : Symbol(Props.a, Decl(file.tsx, 4, 17))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2402, 45))
// ok
const a1 = <Foo {...props}></Foo>;
>a1 : Symbol(a1, Decl(file.tsx, 16, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const a2 = <Foo d={1} {...props}></Foo>;
>a2 : Symbol(a2, Decl(file.tsx, 17, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>d : Symbol(d, Decl(file.tsx, 17, 15))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
// error
const b1 = <Foo a={1} {...props}></Foo>;
>b1 : Symbol(b1, Decl(file.tsx, 20, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>a : Symbol(a, Decl(file.tsx, 20, 15))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b2 = <Foo a={1} b={2} {...props}></Foo>;
>b2 : Symbol(b2, Decl(file.tsx, 21, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>a : Symbol(a, Decl(file.tsx, 21, 15))
>b : Symbol(b, Decl(file.tsx, 21, 21))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b3 = <Foo a={1} d={1} {...props} {...{ d: 1 }}></Foo>;
>b3 : Symbol(b3, Decl(file.tsx, 22, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>a : Symbol(a, Decl(file.tsx, 22, 15))
>d : Symbol(d, Decl(file.tsx, 22, 21))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>d : Symbol(d, Decl(file.tsx, 22, 44))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b4 = <Foo a={1} d={1} {...props} {...{ a: 1, d: 1 }}></Foo>;
>b4 : Symbol(b4, Decl(file.tsx, 23, 5))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
>a : Symbol(a, Decl(file.tsx, 23, 15))
>d : Symbol(d, Decl(file.tsx, 23, 21))
>props : Symbol(props, Decl(file.tsx, 12, 5))
>a : Symbol(a, Decl(file.tsx, 23, 44))
>d : Symbol(d, Decl(file.tsx, 23, 50))
>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))