mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
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:
@@ -1,9 +0,0 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export class App extends React.Component<any, any> {
|
||||
|
||||
render() {
|
||||
return <button />;
|
||||
}
|
||||
|
||||
}
|
||||
27
samples/TypeScript/tsxAttributeResolution9.tsx
Normal file
27
samples/TypeScript/tsxAttributeResolution9.tsx
Normal 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
|
||||
Reference in New Issue
Block a user