TypeScript/tests/cases/compiler/tsxAttributeQuickinfoTypesSameAsObjectLiteral.tsx
Wesley Wigham dd933f4413
Fix get symbol at location to behave correctly for parameter assignments and jsx attributes (#20706)
* Fix get symbol at location to behave correctly got parameter assignments and jsx attributes

* Handle all those edge cases that weren;t explicitly handled

* Fix part of bug WRT getTypeAtLocation and for loops

* Baseline corrections pursuant to #20710

* Restore jsdoc tag interpretation

* Clean up some code, revert fourslash tests

* Cleanup types used by PR feedback
2017-12-15 15:50:22 -08:00

20 lines
295 B
TypeScript

// @jsx: preserve
namespace JSX {
export interface IntrinsicElements {
span: {};
}
export interface Element {
something?: any;
}
}
const Foo = (props: { foo: "A" | "B" | "C" }) => <span>{props.foo}</span>;
Foo({
foo: "B"
});
<Foo foo="B" />