File: tsxAttributeResolution15.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (40 lines) | stat: -rw-r--r-- 1,535 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
37
38
39
40
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))

class BigGreeter extends React.Component<{ }, {}> {
>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))

    render() {
>render : Symbol(BigGreeter.render, Decl(file.tsx, 2, 51))

        return <div>Default hi</div>;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
    }
    greeting: string;
>greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 5, 5))
}

// Error
let a = <BigGreeter prop1="hello" />
>a : Symbol(a, Decl(file.tsx, 10, 3))
>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
>prop1 : Symbol(prop1, Decl(file.tsx, 10, 19))

// OK
let b = <BigGreeter ref={(input) => { this.textInput = input; }} />
>b : Symbol(b, Decl(file.tsx, 13, 3))
>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
>ref : Symbol(ref, Decl(file.tsx, 13, 19))
>input : Symbol(input, Decl(file.tsx, 13, 26))
>input : Symbol(input, Decl(file.tsx, 13, 26))

let c = <BigGreeter data-extra="hi" />
>c : Symbol(c, Decl(file.tsx, 14, 3))
>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
>data-extra : Symbol(data-extra, Decl(file.tsx, 14, 19))