@@ -2,62 +2,72 @@ export default {
22 invalid : [ 
33 { 
44 code : 'type X = string[]' , 
5-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
5+  errors : [ { message : 'Use "Array<string >", not "string []"' } ] , 
66 output : 'type X = Array<string>' 
77 } , 
88 { 
99 code : 'type X = string[]' , 
10-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
10+  errors : [ { message : 'Use "Array<string >", not "string []"' } ] , 
1111 options : [ 'verbose' ] , 
1212 output : 'type X = Array<string>' 
1313 } , 
1414 { 
1515 code : 'type X = Array<string>' , 
16-  errors : [ { message : 'Use "SimpleType []", not "Array<SimpleType >"' } ] , 
16+  errors : [ { message : 'Use "string []", not "Array<string >"' } ] , 
1717 options : [ 'shorthand' ] , 
1818 output : 'type X = string[]' 
1919 } , 
2020 { 
2121 code : 'type X = Date[]' , 
22-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
22+  errors : [ { message : 'Use "Array<Date >", not "Date []"' } ] , 
2323 output : 'type X = Array<Date>' 
2424 } , 
2525 { 
2626 code : 'type X = Promise<string>[]' , 
27-  errors : [ { message : 'Use "Array<SimpleType> ", not "SimpleType []"' } ] , 
27+  errors : [ { message : 'Use "Array<Promise<string>> ", not "Promise<string> []"' } ] , 
2828 output : 'type X = Array<Promise<string>>' 
2929 } , 
3030 { 
31-  code : 'type X = $Keys<{  foo: string  }>[]' , 
32-  errors : [ { message : 'Use "Array<SimpleType> ", not "SimpleType []"' } ] , 
33-  output : 'type X = Array<$Keys<{  foo: string  }>>' 
31+  code : 'type X = $Keys<{foo: string}>[]' , 
32+  errors : [ { message : 'Use "Array<$Keys<{foo: string}>> ", not "$Keys<{foo: string}> []"' } ] , 
33+  output : 'type X = Array<$Keys<{foo: string}>>' 
3434 } , 
3535 { 
3636 code : 'type X = any[]' , 
37-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
37+  errors : [ { message : 'Use "Array<any >", not "any []"' } ] , 
3838 output : 'type X = Array<any>' 
3939 } , 
4040 { 
4141 code : 'type X = mixed[]' , 
42-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
42+  errors : [ { message : 'Use "Array<mixed >", not "mixed []"' } ] , 
4343 output : 'type X = Array<mixed>' 
4444 } , 
4545 { 
4646 code : 'type X = void[]' , 
47-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
47+  errors : [ { message : 'Use "Array<void >", not "void []"' } ] , 
4848 output : 'type X = Array<void>' 
4949 } , 
5050 { 
5151 code : 'type X = null[]' , 
52-  errors : [ { message : 'Use "Array<SimpleType >", not "SimpleType []"' } ] , 
52+  errors : [ { message : 'Use "Array<null >", not "null []"' } ] , 
5353 output : 'type X = Array<null>' 
5454 } , 
5555 { 
5656 code : 'type X = string[][]' , 
5757 errors : [ 
58-  { message : 'Use "Array<SimpleType >", not "SimpleType []"' } , 
59-  { message : 'Use "Array<SimpleType >", not "SimpleType []"' } 
58+  { message : 'Use "Array<string[] >", not "string[] []"' } , 
59+  { message : 'Use "Array<string >", not "string []"' } 
6060 ] 
61+  } , 
62+  { 
63+  code : 'type X = Promise<{\n foo: string,\n bar: number\n}>[]' , 
64+  errors : [ { message : 'Use "Array<Promise<{ foo: string, bar: number }>>", not "Promise<{ foo: string, bar: number }>[]"' } ] , 
65+  output : 'type X = Array<Promise<{\n foo: string,\n bar: number\n}>>' 
66+  } , 
67+  { 
68+  code : 'type X = Promise<{\n foo: string,\n bar: number,\n quo: boolean\n}>[]' , 
69+  errors : [ { message : 'Use "Array<Type>", not "Type[]"' } ] , 
70+  output : 'type X = Array<Promise<{\n foo: string,\n bar: number,\n quo: boolean\n}>>' 
6171 } 
6272 ] , 
6373 misconfigured : [ 
0 commit comments