File: tsxSpreadAttributesResolution7.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 (61 lines) | stat: -rw-r--r-- 2,198 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
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))

type TextProps = { editable: false }
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
>editable : Symbol(editable, Decl(file.tsx, 2, 18))

               | { editable: true, onEdit: (newText: string) => void };
>editable : Symbol(editable, Decl(file.tsx, 3, 18))
>onEdit : Symbol(onEdit, Decl(file.tsx, 3, 34))
>newText : Symbol(newText, Decl(file.tsx, 3, 44))

class TextComponent extends React.Component<TextProps, {}> {
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
>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))
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))

    render() {
>render : Symbol(TextComponent.render, Decl(file.tsx, 5, 60))

        return <span>Some Text..</span>;
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
    }
}

// OK
const textPropsFalse: TextProps = {
>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 12, 5))
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))

    editable: false
>editable : Symbol(editable, Decl(file.tsx, 12, 35))

};

let y1 = <TextComponent {...textPropsFalse} />
>y1 : Symbol(y1, Decl(file.tsx, 16, 3))
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 12, 5))

const textPropsTrue: TextProps = {
>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 18, 5))
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))

    editable: true,
>editable : Symbol(editable, Decl(file.tsx, 18, 34))

    onEdit: () => {}
>onEdit : Symbol(onEdit, Decl(file.tsx, 19, 19))

};

let y2 = <TextComponent {...textPropsTrue} />
>y2 : Symbol(y2, Decl(file.tsx, 23, 3))
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 18, 5))