File: tsxAttributeResolution4.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (36 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
	interface Element { }
	interface IntrinsicElements {
		test1: Attribs1;
>test1 : Attribs1
	}
}
interface Attribs1 {
	x(n: string): void;
>x : (n: string) => void
>n : string
}

// OK
<test1 {... {x: (n) => 0} } />;
><test1 {... {x: (n) => 0} } /> : JSX.Element
>test1 : any
>{x: (n) => 0} : { x: (n: string) => number; }
>x : (n: string) => number
>(n) => 0 : (n: string) => number
>n : string
>0 : 0

// Error, no member 'len' on 'string'
<test1 {... {x: (n) => n.len} } />;
><test1 {... {x: (n) => n.len} } /> : JSX.Element
>test1 : any
>{x: (n) => n.len} : { x: (n: string) => any; }
>x : (n: string) => any
>(n) => n.len : (n: string) => any
>n : string
>n.len : any
>n : string
>len : any