File: tsxSpreadAttributesResolution6.symbols

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 (43 lines) | stat: -rw-r--r-- 1,637 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
=== 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))
    }
}

// Error
let x = <TextComponent editable={true} />
>x : Symbol(x, Decl(file.tsx, 12, 3))
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
>editable : Symbol(editable, Decl(file.tsx, 12, 22))

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

    editable: false
>editable : Symbol(editable, Decl(file.tsx, 14, 30))

};