Files
tsgo/testdata/baselines/reference/submodule/conformance/tsxAttributeResolution11.js

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'/>;