@@ -2043,6 +2043,43 @@ describe("Issue Tests", () => {
2043
2043
equal ( exp . type ?. toString ( ) , "never[]" ) ;
2044
2044
} ) ;
2045
2045
2046
+ it ( "#2914 does not categorize @class constructor if class is categorized" , ( ) => {
2047
+ app . options . setValue ( "categorizeByGroup" , false ) ;
2048
+ const project = convert ( ) ;
2049
+ const Bug1 = query ( project , "Bug1" ) ;
2050
+ equal ( Bug1 . children ?. map ( c => c . name ) , [ "constructor" , "x" ] ) ;
2051
+ equal ( Bug1 . categories === undefined , true , "Should not have categories" ) ;
2052
+
2053
+ equal ( project . categories ?. length , 2 ) ;
2054
+ equal ( project . categories [ 0 ] . title , "Bug" ) ;
2055
+ equal ( project . categories [ 1 ] . title , "Other" ) ;
2056
+ } ) ;
2057
+
2058
+ it ( "#2914 includes constructor parameters" , ( ) => {
2059
+ app . options . setValue ( "categorizeByGroup" , false ) ;
2060
+ const project = convert ( ) ;
2061
+ const ctor = querySig ( project , "Bug2.constructor" ) ;
2062
+ equal ( ctor . parameters ?. length , 1 ) ;
2063
+ equal ( ctor . parameters [ 0 ] . name , "x" ) ;
2064
+ equal ( ctor . parameters [ 0 ] . type ?. toString ( ) , "string" ) ;
2065
+ } ) ;
2066
+
2067
+ it ( "#2914 converts constructor type parameters as class type parameters" , ( ) => {
2068
+ const project = convert ( ) ;
2069
+ const Bug3 = query ( project , "Bug3" ) ;
2070
+ equal ( Bug3 . typeParameters ?. length , 1 ) ;
2071
+ equal ( Bug3 . typeParameters [ 0 ] . type ?. toString ( ) , "string" ) ;
2072
+ const ctor = querySig ( project , "Bug3.constructor" ) ;
2073
+ equal ( ctor . typeParameters , undefined ) ;
2074
+ } ) ;
2075
+
2076
+ it ( "#2914 includes call signatures on the class type" , ( ) => {
2077
+ const project = convert ( ) ;
2078
+ const Bug4 = query ( project , "Bug4" ) ;
2079
+ equal ( Bug4 . signatures ?. length , 1 ) ;
2080
+ equal ( Bug4 . signatures [ 0 ] . type ?. toString ( ) , "U" ) ;
2081
+ } ) ;
2082
+
2046
2083
it ( "#2917 stringifies index signatures" , ( ) => {
2047
2084
const project = convert ( ) ;
2048
2085
const data = query ( project , "Foo.data" ) ;
0 commit comments