1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ //// type jamming<A> = new </*0*/A>() => jamming</*1*/A>;
4
+ //// type jamming<A> = (new <A>() => jamming<A>) & { constructor: /*2*/A };
5
+ //// type jamming<A> = new <A>() => jamming<A> & { constructor: /*3*/A };
6
+
7
+ let typeAliashDisplayParts = [ { text : "type" , kind : "keyword" } , { text : " " , kind : "space" } , { text : "jamming" , kind : "aliasName" } ,
8
+ { text : "<" , kind : "punctuation" } , { text : "A" , kind : "typeParameterName" } , { text : ">" , kind : "punctuation" } ] ;
9
+
10
+ let typeParameterDisplayParts = [ { text : "(" , kind : "punctuation" } , { text : "type parameter" , kind : "text" } , { text : ")" , kind : "punctuation" } , { text : " " , kind : "space" } ,
11
+ { text : "A" , kind : "typeParameterName" } , { text : " " , kind : "space" } , { text : "in" , kind : "keyword" } , { text : " " , kind : "space" } ] ;
12
+
13
+ let constructorTypeDisplayParts = [ { text : "<" , kind : "punctuation" } , { text : "A" , kind : "typeParameterName" } , { text : ">" , kind : "punctuation" } ,
14
+ { text : "(" , kind : "punctuation" } , { text : ")" , kind : "punctuation" } , { text : ":" , kind : "punctuation" } , { text : " " , kind : "space" } ,
15
+ { text : "new" , kind : "keyword" } , { "text" : " " , kind : "space" } , { text : "<" , kind : "punctuation" } , { text : "A" , kind : "typeParameterName" } ,
16
+ { text : ">" , kind : "punctuation" } , { text : "(" , kind : "punctuation" } , { text : ")" , kind : "punctuation" } , { "text" : " " , kind : "space" } ,
17
+ { text : "=>" , kind : "punctuation" } , { "text" : " " , kind : "space" } , { text : "jamming" , kind : "aliasName" } ] ;
18
+
19
+ let constructorTypeWithLongReturnTypeDisplayParts = [ { "text" : "<" , kind : "punctuation" } , { "text" : "A" , kind : "typeParameterName" } , { "text" : ">" , kind : "punctuation" } ,
20
+ { "text" : "(" , kind : "punctuation" } , { "text" : ")" , kind : "punctuation" } , { "text" : ":" , kind : "punctuation" } , { "text" : " " , kind : "space" } , { "text" : "(" , kind : "punctuation" } ,
21
+ { "text" : "new" , kind : "keyword" } , { "text" : " " , kind : "space" } , { "text" : "<" , kind : "punctuation" } , { "text" : "A" , kind : "typeParameterName" } , { "text" : ">" , kind : "punctuation" } ,
22
+ { "text" : "(" , kind : "punctuation" } , { "text" : ")" , kind : "punctuation" } , { "text" : " " , kind : "space" } , { "text" : "=>" , kind : "punctuation" } , { "text" : " " , kind : "space" } ,
23
+ { "text" : "jamming" , kind : "aliasName" } , { "text" : ")" , kind : "punctuation" } , { "text" : " " , kind : "space" } , { "text" : "&" , kind : "punctuation" } , { "text" : " " , kind : "space" } ,
24
+ { "text" : "{" , kind : "punctuation" } , { "text" : "\n" , kind : "lineBreak" } , { "text" : " " , kind : "space" } , { "text" : "constructor" , kind : "propertyName" } , { "text" : ":" , kind : "punctuation" } ,
25
+ { "text" : " " , kind : "space" } , { "text" : "A" , kind : "typeParameterName" } , { "text" :";" , kind : "punctuation" } , { "text" :"\n" , kind : "lineBreak" } , { "text" :"}" , kind : "punctuation" } ] ;
26
+
27
+ goTo . marker ( '0' ) ;
28
+ verify . verifyQuickInfoDisplayParts ( "type parameter" , "" , { start : test . markerByName ( "0" ) . position , length : "A" . length } ,
29
+ typeParameterDisplayParts . concat ( constructorTypeDisplayParts ) , [ ] ) ;
30
+
31
+ goTo . marker ( '1' ) ;
32
+ verify . verifyQuickInfoDisplayParts ( "type parameter" , "" , { start : test . markerByName ( "1" ) . position , length : "A" . length } ,
33
+ typeParameterDisplayParts . concat ( constructorTypeDisplayParts ) , [ ] ) ;
34
+
35
+ goTo . marker ( '2' ) ;
36
+ verify . verifyQuickInfoDisplayParts ( "type parameter" , "" , { start : test . markerByName ( "2" ) . position , length : "A" . length } ,
37
+ typeParameterDisplayParts . concat ( typeAliashDisplayParts ) , [ ] ) ;
38
+
39
+ goTo . marker ( '3' ) ;
40
+ verify . verifyQuickInfoDisplayParts ( "type parameter" , "" , { start : test . markerByName ( "3" ) . position , length : "A" . length } ,
41
+ typeParameterDisplayParts . concat ( constructorTypeWithLongReturnTypeDisplayParts ) , [ ] ) ;
0 commit comments