mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	The sample file is from https://github.com/Microsoft/TypeScript/blob/master/tests/cases/conformance/jsx/tsxAttributeResolution9.tsx
		
			
				
	
	
		
			28 lines
		
	
	
		
			407 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			407 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| //@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
 |