feat(types): add generic type support to TransformableInfo#345
feat(types): add generic type support to TransformableInfo#345Baptiste-hero wants to merge 1 commit intowinstonjs:masterfrom
Conversation
Convert TransformableInfo from interface to generic type with TCustom parameter, allowing custom properties to be properly typed. Update printf function to support the generic parameter for better type inference when using custom fields.
Add Generic Support to TransformableInfo for Type-Safe Custom PropertiesProblem: The printf function accepts a callback with a Current Workaround: Proposed Solution: With this change, users can specify custom property types directly: Benefits:
Implementation Notes: This change converts I'm open to discussion about this implementation, as I don't have full context on logform's architecture and usage patterns. If the interface-to-type conversion is problematic, I'd be happy to explore alternative approaches. Thank you for considering this contribution! |
Convert TransformableInfo from interface to generic type with TCustom parameter, allowing custom properties to be properly typed. Update printf function to support the generic parameter for better type inference when using custom fields.