|
1 |
| -=== tests/cases/compiler/excessiveStackDepthFlatArray.ts === |
| 1 | +=== tests/cases/compiler/index.tsx === |
2 | 2 | interface MiddlewareArray<T> extends Array<T> {}
|
3 |
| ->MiddlewareArray : Symbol(MiddlewareArray, Decl(excessiveStackDepthFlatArray.ts, 0, 0)) |
4 |
| ->T : Symbol(T, Decl(excessiveStackDepthFlatArray.ts, 0, 26)) |
| 3 | +>MiddlewareArray : Symbol(MiddlewareArray, Decl(index.tsx, 0, 0)) |
| 4 | +>T : Symbol(T, Decl(index.tsx, 0, 26)) |
5 | 5 | >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more)
|
6 |
| ->T : Symbol(T, Decl(excessiveStackDepthFlatArray.ts, 0, 26)) |
| 6 | +>T : Symbol(T, Decl(index.tsx, 0, 26)) |
7 | 7 |
|
8 | 8 | declare function configureStore(options: { middleware: MiddlewareArray<any> }): void;
|
9 |
| ->configureStore : Symbol(configureStore, Decl(excessiveStackDepthFlatArray.ts, 0, 48)) |
10 |
| ->options : Symbol(options, Decl(excessiveStackDepthFlatArray.ts, 1, 32)) |
11 |
| ->middleware : Symbol(middleware, Decl(excessiveStackDepthFlatArray.ts, 1, 42)) |
12 |
| ->MiddlewareArray : Symbol(MiddlewareArray, Decl(excessiveStackDepthFlatArray.ts, 0, 0)) |
| 9 | +>configureStore : Symbol(configureStore, Decl(index.tsx, 0, 48)) |
| 10 | +>options : Symbol(options, Decl(index.tsx, 1, 32)) |
| 11 | +>middleware : Symbol(middleware, Decl(index.tsx, 1, 42)) |
| 12 | +>MiddlewareArray : Symbol(MiddlewareArray, Decl(index.tsx, 0, 0)) |
13 | 13 |
|
14 | 14 | declare const defaultMiddleware: MiddlewareArray<any>;
|
15 |
| ->defaultMiddleware : Symbol(defaultMiddleware, Decl(excessiveStackDepthFlatArray.ts, 3, 13)) |
16 |
| ->MiddlewareArray : Symbol(MiddlewareArray, Decl(excessiveStackDepthFlatArray.ts, 0, 0)) |
| 15 | +>defaultMiddleware : Symbol(defaultMiddleware, Decl(index.tsx, 3, 13)) |
| 16 | +>MiddlewareArray : Symbol(MiddlewareArray, Decl(index.tsx, 0, 0)) |
17 | 17 |
|
18 | 18 | configureStore({
|
19 |
| ->configureStore : Symbol(configureStore, Decl(excessiveStackDepthFlatArray.ts, 0, 48)) |
| 19 | +>configureStore : Symbol(configureStore, Decl(index.tsx, 0, 48)) |
20 | 20 |
|
21 | 21 | middleware: [...defaultMiddleware], // Should not error
|
22 |
| ->middleware : Symbol(middleware, Decl(excessiveStackDepthFlatArray.ts, 4, 16)) |
23 |
| ->defaultMiddleware : Symbol(defaultMiddleware, Decl(excessiveStackDepthFlatArray.ts, 3, 13)) |
| 22 | +>middleware : Symbol(middleware, Decl(index.tsx, 4, 16)) |
| 23 | +>defaultMiddleware : Symbol(defaultMiddleware, Decl(index.tsx, 3, 13)) |
24 | 24 |
|
25 | 25 | });
|
26 | 26 |
|
| 27 | +declare namespace React { |
| 28 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 29 | + |
| 30 | + type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = E; |
| 31 | +>DetailedHTMLProps : Symbol(DetailedHTMLProps, Decl(index.tsx, 8, 25)) |
| 32 | +>E : Symbol(E, Decl(index.tsx, 9, 25)) |
| 33 | +>HTMLAttributes : Symbol(HTMLAttributes, Decl(index.tsx, 9, 61)) |
| 34 | +>T : Symbol(T, Decl(index.tsx, 9, 53)) |
| 35 | +>T : Symbol(T, Decl(index.tsx, 9, 53)) |
| 36 | +>E : Symbol(E, Decl(index.tsx, 9, 25)) |
| 37 | + |
| 38 | + interface HTMLAttributes<T> { |
| 39 | +>HTMLAttributes : Symbol(HTMLAttributes, Decl(index.tsx, 9, 61)) |
| 40 | +>T : Symbol(T, Decl(index.tsx, 10, 27)) |
| 41 | + |
| 42 | + children?: ReactNode; |
| 43 | +>children : Symbol(HTMLAttributes.children, Decl(index.tsx, 10, 31)) |
| 44 | +>ReactNode : Symbol(ReactNode, Decl(index.tsx, 12, 3)) |
| 45 | + } |
| 46 | + type ReactNode = ReactChild | ReactFragment | boolean | null | undefined; |
| 47 | +>ReactNode : Symbol(ReactNode, Decl(index.tsx, 12, 3)) |
| 48 | +>ReactChild : Symbol(ReactChild, Decl(index.tsx, 14, 35)) |
| 49 | +>ReactFragment : Symbol(ReactFragment, Decl(index.tsx, 15, 30)) |
| 50 | + |
| 51 | + type ReactText = string | number; |
| 52 | +>ReactText : Symbol(ReactText, Decl(index.tsx, 13, 75)) |
| 53 | + |
| 54 | + type ReactChild = ReactText; |
| 55 | +>ReactChild : Symbol(ReactChild, Decl(index.tsx, 14, 35)) |
| 56 | +>ReactText : Symbol(ReactText, Decl(index.tsx, 13, 75)) |
| 57 | + |
| 58 | + type ReactFragment = {} | ReactNodeArray; |
| 59 | +>ReactFragment : Symbol(ReactFragment, Decl(index.tsx, 15, 30)) |
| 60 | +>ReactNodeArray : Symbol(ReactNodeArray, Decl(index.tsx, 16, 43)) |
| 61 | + |
| 62 | + interface ReactNodeArray extends Array<ReactNode> {} |
| 63 | +>ReactNodeArray : Symbol(ReactNodeArray, Decl(index.tsx, 16, 43)) |
| 64 | +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 2 more) |
| 65 | +>ReactNode : Symbol(ReactNode, Decl(index.tsx, 12, 3)) |
| 66 | +} |
| 67 | +declare namespace JSX { |
| 68 | +>JSX : Symbol(JSX, Decl(index.tsx, 18, 1)) |
| 69 | + |
| 70 | + interface IntrinsicElements { |
| 71 | +>IntrinsicElements : Symbol(IntrinsicElements, Decl(index.tsx, 19, 23)) |
| 72 | + |
| 73 | + ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>; |
| 74 | +>ul : Symbol(IntrinsicElements.ul, Decl(index.tsx, 20, 31)) |
| 75 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 76 | +>DetailedHTMLProps : Symbol(React.DetailedHTMLProps, Decl(index.tsx, 8, 25)) |
| 77 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 78 | +>HTMLAttributes : Symbol(React.HTMLAttributes, Decl(index.tsx, 9, 61)) |
| 79 | +>HTMLUListElement : Symbol(HTMLUListElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) |
| 80 | +>HTMLUListElement : Symbol(HTMLUListElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) |
| 81 | + |
| 82 | + li: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLIElement>, HTMLLIElement>; |
| 83 | +>li : Symbol(IntrinsicElements.li, Decl(index.tsx, 21, 90)) |
| 84 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 85 | +>DetailedHTMLProps : Symbol(React.DetailedHTMLProps, Decl(index.tsx, 8, 25)) |
| 86 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 87 | +>HTMLAttributes : Symbol(React.HTMLAttributes, Decl(index.tsx, 9, 61)) |
| 88 | +>HTMLLIElement : Symbol(HTMLLIElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) |
| 89 | +>HTMLLIElement : Symbol(HTMLLIElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) |
| 90 | + } |
| 91 | +} |
| 92 | +declare var React: any; |
| 93 | +>React : Symbol(React, Decl(index.tsx, 6, 3), Decl(index.tsx, 25, 11)) |
| 94 | + |
| 95 | +const Component = () => { |
| 96 | +>Component : Symbol(Component, Decl(index.tsx, 27, 5)) |
| 97 | + |
| 98 | + const categories = ['Fruit', 'Vegetables']; |
| 99 | +>categories : Symbol(categories, Decl(index.tsx, 28, 7)) |
| 100 | + |
| 101 | + return ( |
| 102 | + <ul> |
| 103 | +>ul : Symbol(JSX.IntrinsicElements.ul, Decl(index.tsx, 20, 31)) |
| 104 | + |
| 105 | + <li>All</li> |
| 106 | +>li : Symbol(JSX.IntrinsicElements.li, Decl(index.tsx, 21, 90)) |
| 107 | +>li : Symbol(JSX.IntrinsicElements.li, Decl(index.tsx, 21, 90)) |
| 108 | + |
| 109 | + {categories.map((category) => ( |
| 110 | +>categories.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) |
| 111 | +>categories : Symbol(categories, Decl(index.tsx, 28, 7)) |
| 112 | +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) |
| 113 | +>category : Symbol(category, Decl(index.tsx, 33, 23)) |
| 114 | + |
| 115 | + <li key={category}>{category}</li> // Error about 'key' only |
| 116 | +>li : Symbol(JSX.IntrinsicElements.li, Decl(index.tsx, 21, 90)) |
| 117 | +>key : Symbol(key, Decl(index.tsx, 34, 11)) |
| 118 | +>category : Symbol(category, Decl(index.tsx, 33, 23)) |
| 119 | +>category : Symbol(category, Decl(index.tsx, 33, 23)) |
| 120 | +>li : Symbol(JSX.IntrinsicElements.li, Decl(index.tsx, 21, 90)) |
| 121 | + |
| 122 | + ))} |
| 123 | + </ul> |
| 124 | +>ul : Symbol(JSX.IntrinsicElements.ul, Decl(index.tsx, 20, 31)) |
| 125 | + |
| 126 | + ); |
| 127 | +}; |
| 128 | + |
0 commit comments