I have a function explicitly defined to return either an object or undefined. However, TypeScript seems to ignore the undefined part, indicating that only an object can be returned. This could hide potential issues, as I might try to access a property on an object that could actually be undefined.
I have a function explicitly defined to return either an object or undefined. However, TypeScript seems to ignore the undefined part, indicating that only an object can be returned. This could hide potential issues, as I might try to access a property on an object that could actually be undefined.
Function docs:![Image](https://github.com/near/fast-auth-signer/assets/22358004/ccea98bd-d0fc-4375-aff0-6595942edd20)
Function definition:![Image](https://github.com/near/fast-auth-signer/assets/22358004/b1e59d2f-b7ee-4029-992d-52a134827607)