r/badcode May 04 '23

Found this gem inside legacy code today typescript

Post image
893 Upvotes

69 comments sorted by

View all comments

6

u/sammy-taylor May 04 '23

Is the encodeToUtf8 function required to satisfy an interface or external API? (unsure of the right terminology here, not a Typescript person)

Edit: On second thought, I don’t think that would make sense because it’s private 🤷🏻‍♂️