File: tsxSpreadAttributesResolution10.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (63 lines) | stat: -rw-r--r-- 2,005 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))

interface OptionProp {
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))

    x?: 2
>x : Symbol(OptionProp.x, Decl(file.tsx, 2, 22))
}

class Opt extends React.Component<OptionProp, {}> {
>Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
>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))
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))

    render() {
>render : Symbol(Opt.render, Decl(file.tsx, 6, 51))

        return <div>Hello</div>;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
    }
}

const obj: OptionProp = {};
>obj : Symbol(obj, Decl(file.tsx, 12, 5))
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))

const obj1: OptionProp = {
>obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))

    x: 2
>x : Symbol(x, Decl(file.tsx, 13, 26))
}

// Error
let y = <Opt {...obj} x={3}/>;
>y : Symbol(y, Decl(file.tsx, 18, 3))
>Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
>obj : Symbol(obj, Decl(file.tsx, 12, 5))
>x : Symbol(x, Decl(file.tsx, 18, 21))

let y1 = <Opt {...obj1} x="Hi"/>;
>y1 : Symbol(y1, Decl(file.tsx, 19, 3))
>Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
>obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
>x : Symbol(x, Decl(file.tsx, 19, 23))

let y2 = <Opt {...obj1} x={3}/>;
>y2 : Symbol(y2, Decl(file.tsx, 20, 3))
>Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
>obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
>x : Symbol(x, Decl(file.tsx, 20, 23))

let y3 = <Opt x />;
>y3 : Symbol(y3, Decl(file.tsx, 21, 3))
>Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
>x : Symbol(x, Decl(file.tsx, 21, 13))