mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 22:29:37 -05:00
Added test.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// @jsx: preserve
|
||||
// @declaration: true
|
||||
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
span: {};
|
||||
}
|
||||
}
|
||||
|
||||
const FooComponent = (props: { foo: "A" | "B" | "C" }) => <span>{props.foo}</span>;
|
||||
|
||||
<FooComponent foo={"A"} />;
|
||||
<FooComponent foo="A" />;
|
||||
|
||||
<FooComponent foo={"f"} />;
|
||||
<FooComponent foo="f" />;
|
||||
Reference in New Issue
Block a user