File tree Expand file tree Collapse file tree
test/unit/should_annotate_types_properly Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,6 @@ export function trimDescription(description?: string) {
8686 description
8787 ?. split ( "\n" )
8888 . map ( ( str ) => str . trim ( ) . replaceAll ( '"' , "" ) . replaceAll ( "\\" , "" ) )
89- . find ( ( str ) => str . match ( / ^ [ a - z A - Z ] / ) ) ?? ""
89+ . find ( ( str ) => str . length > 0 ) ?? ""
9090 ) ;
9191}
Original file line number Diff line number Diff line change @@ -26,7 +26,16 @@ data class TypeThatShouldBeProperlyAnnotated(
2626 @Deprecated(" It uses the @Deprecated annotation for the reason" )
2727 val deprecated7 : UnionThatShouldBeProperlyAnnotated ? = null ,
2828 @Deprecated(" Multiline reason" )
29- val deprecated8 : String? = null
29+ val deprecated8 : String? = null ,
30+ @param:GraphQLDescription("(parenthesis) description.")
31+ val nonLetterDescription1 : String? = null ,
32+ @param:GraphQLDescription("`backtick` description.")
33+ val nonLetterDescription2 : String? = null ,
34+ @param:GraphQLDescription("42 numeric description.")
35+ val nonLetterDescription3 : String? = null ,
36+ @param:GraphQLDescription("(Deprecated ) Use something else.")
37+ @Deprecated(" (internal) replaced in v3" )
38+ val nonLetterDeprecated : String? = null
3039) : UnionThatShouldBeProperlyAnnotated
3140
3241interface UnionThatShouldBeProperlyAnnotated
Original file line number Diff line number Diff line change @@ -31,6 +31,22 @@ type TypeThatShouldBeProperlyAnnotated {
3131 @deprecated (
3232 reason : " \n Multiline reason\n with spaces\n "
3333 )
34+ """
35+ (parenthesis) description.
36+ """
37+ nonLetterDescription1 : String
38+ """
39+ `backtick` description.
40+ """
41+ nonLetterDescription2 : String
42+ """
43+ 42 numeric description.
44+ """
45+ nonLetterDescription3 : String
46+ """
47+ (Deprecated) Use something else.
48+ """
49+ nonLetterDeprecated : String @deprecated (reason : " (internal) replaced in v3" )
3450}
3551
3652union UnionThatShouldBeProperlyAnnotated = TypeThatShouldBeProperlyAnnotated
You can’t perform that action at this time.
0 commit comments