Describe the bug
The return type of the get displayName() method on the NameAddrHeader class is typed as string. However, the displayName could be undefined so it should be typed as string | undefined.
Additional context
My app was crashing in production because I was accessing string methods on the displayName property assuming it would always be a string but it turned out to be undefined.
Describe the bug The return type of the
get displayName()
method on theNameAddrHeader
class is typed asstring
. However, thedisplayName
could beundefined
so it should be typed asstring | undefined
.Additional context My app was crashing in production because I was accessing string methods on the
displayName
property assuming it would always be a string but it turned out to beundefined
.