type-fest
type-fest copied to clipboard
DelimiterCasedPropertiesDeep with Opaque yields wrong type
When using DelimiterCasedPropertiesDeep
with a type containing a Opaque
field, the result seems wrong.
type O = Opaque<string, "O">
type D = DelimiterCasedPropertiesDeep<{partnerId: O}, '_'>
// Expected
// D: {partner_id: O}
// Actual
// D: {partner_id: {char_at, .....}}
It seems all functions for strings are also cased and then added.
@valkum This is the expected behaviour, you have to use UnwrapOpaque to get the base type before passing it to another type.
Closing for now, comment if you believe this to still be an issue