QuestPDF icon indicating copy to clipboard operation
QuestPDF copied to clipboard

Consider replace type parameter for method at TextExtensions

Open rstm-sf opened this issue 2 years ago • 0 comments

Consider replace type parameter for method at TextExtensions.

https://github.com/QuestPDF/QuestPDF/blob/b87e8d5d4e47325d7843931ef00a394c368e810f/QuestPDF/Fluent/TextExtensions.cs#L284-L289

-public static TextSpanDescriptor Text(this IContainer element, object? text)
+public static TextSpanDescriptor Text(this IContainer element, string? text)

It seems to me that the user of the library must explicitly call .ToString(). This is necessary to understand what happens if we pass a custom object without an overridden .ToString()

rstm-sf avatar Jun 17 '22 09:06 rstm-sf