Replace the sample file for .tsx extension

The sample file is from https://github.com/Microsoft/TypeScript/blob/master/tests/cases/conformance/jsx/tsxAttributeResolution9.tsx
This commit is contained in:
wizawu
2015-10-03 11:01:22 +08:00
parent c5be9cc3e9
commit d6d368a65d
2 changed files with 27 additions and 9 deletions

View File

@@ -1,9 +0,0 @@
import * as React from 'react';
export class App extends React.Component<any, any> {
render() {
return <button />;
}
}

View File

@@ -0,0 +1,27 @@
//@jsx: preserve
//@module: amd
//@filename: react.d.ts
declare module JSX {
interface Element { }
interface IntrinsicElements {
}
interface ElementAttributesProperty {
props;
}
}
interface Props {
foo: string;
}
//@filename: file.tsx
export class MyComponent {
render() {
}
props: { foo: string; }
}
<MyComponent foo="bar" />; // ok
<MyComponent foo={0} />; // should be an error