|
| 1 | +=== tests/cases/compiler/tsxAttributesHasInferrableIndex.tsx === |
| 2 | +type AttributeValue = number | string | Date | boolean; |
| 3 | +>AttributeValue : Symbol(AttributeValue, Decl(tsxAttributesHasInferrableIndex.tsx, 0, 0)) |
| 4 | +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) |
| 5 | + |
| 6 | +interface Attributes { |
| 7 | +>Attributes : Symbol(Attributes, Decl(tsxAttributesHasInferrableIndex.tsx, 0, 55)) |
| 8 | + |
| 9 | + [key: string]: AttributeValue; |
| 10 | +>key : Symbol(key, Decl(tsxAttributesHasInferrableIndex.tsx, 2, 5)) |
| 11 | +>AttributeValue : Symbol(AttributeValue, Decl(tsxAttributesHasInferrableIndex.tsx, 0, 0)) |
| 12 | +} |
| 13 | +function createElement(name: string, attributes: Attributes | undefined, ...contents: string[]) { |
| 14 | +>createElement : Symbol(createElement, Decl(tsxAttributesHasInferrableIndex.tsx, 3, 1), Decl(tsxAttributesHasInferrableIndex.tsx, 6, 1)) |
| 15 | +>name : Symbol(name, Decl(tsxAttributesHasInferrableIndex.tsx, 4, 23)) |
| 16 | +>attributes : Symbol(attributes, Decl(tsxAttributesHasInferrableIndex.tsx, 4, 36)) |
| 17 | +>Attributes : Symbol(Attributes, Decl(tsxAttributesHasInferrableIndex.tsx, 0, 55)) |
| 18 | +>contents : Symbol(contents, Decl(tsxAttributesHasInferrableIndex.tsx, 4, 72)) |
| 19 | + |
| 20 | + return name; |
| 21 | +>name : Symbol(name, Decl(tsxAttributesHasInferrableIndex.tsx, 4, 23)) |
| 22 | +} |
| 23 | +namespace createElement.JSX { |
| 24 | +>createElement : Symbol(createElement, Decl(tsxAttributesHasInferrableIndex.tsx, 3, 1), Decl(tsxAttributesHasInferrableIndex.tsx, 6, 1)) |
| 25 | +>JSX : Symbol(JSX, Decl(tsxAttributesHasInferrableIndex.tsx, 7, 24)) |
| 26 | + |
| 27 | + type Element = string; |
| 28 | +>Element : Symbol(Element, Decl(tsxAttributesHasInferrableIndex.tsx, 7, 29)) |
| 29 | +} |
| 30 | + |
| 31 | +function Button(attributes: Attributes | undefined, contents: string[]) { |
| 32 | +>Button : Symbol(Button, Decl(tsxAttributesHasInferrableIndex.tsx, 9, 1)) |
| 33 | +>attributes : Symbol(attributes, Decl(tsxAttributesHasInferrableIndex.tsx, 11, 16)) |
| 34 | +>Attributes : Symbol(Attributes, Decl(tsxAttributesHasInferrableIndex.tsx, 0, 55)) |
| 35 | +>contents : Symbol(contents, Decl(tsxAttributesHasInferrableIndex.tsx, 11, 51)) |
| 36 | + |
| 37 | + return ''; |
| 38 | +} |
| 39 | +const b = <Button></Button> |
| 40 | +>b : Symbol(b, Decl(tsxAttributesHasInferrableIndex.tsx, 14, 5)) |
| 41 | +>Button : Symbol(Button, Decl(tsxAttributesHasInferrableIndex.tsx, 9, 1)) |
| 42 | +>Button : Symbol(Button, Decl(tsxAttributesHasInferrableIndex.tsx, 9, 1)) |
| 43 | + |
0 commit comments