mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
39 lines
568 B
TypeScript
39 lines
568 B
TypeScript
//// [tests/cases/conformance/jsx/tsxAttributeResolution11.tsx] ////
|
|
|
|
//// [react.d.ts]
|
|
declare namespace JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
}
|
|
interface ElementAttributesProperty {
|
|
props;
|
|
}
|
|
interface IntrinsicAttributes {
|
|
ref?: string;
|
|
}
|
|
}
|
|
|
|
//// [file.tsx]
|
|
class MyComponent {
|
|
render() {
|
|
}
|
|
|
|
props: {
|
|
ref?: string;
|
|
}
|
|
}
|
|
|
|
// Should be an OK
|
|
var x = <MyComponent bar='world' />;
|
|
|
|
|
|
|
|
//// [file.jsx]
|
|
"use strict";
|
|
class MyComponent {
|
|
render() {
|
|
}
|
|
}
|
|
// Should be an OK
|
|
var x = <MyComponent bar='world'/>;
|