Closed riperk closed 5 years ago
PaymentRequestObject is defined as having a:
PaymentRequestObject
https://github.com/bitcoinjs/bolt11/blob/5ce112c68ec9da90e127bf423a4bb8cff5037968/payreq.d.ts#L24-L25
which is not compatible with nulls:
https://github.com/bitcoinjs/bolt11/blob/5ce112c68ec9da90e127bf423a4bb8cff5037968/payreq.js#L779-L780
So either the type should be changed to X | null or should actually use undefined like the type declaration.
X | null
undefined
Thanks for the report!
Published as 1.2.6
PaymentRequestObject
is defined as having a:https://github.com/bitcoinjs/bolt11/blob/5ce112c68ec9da90e127bf423a4bb8cff5037968/payreq.d.ts#L24-L25
which is not compatible with nulls:
https://github.com/bitcoinjs/bolt11/blob/5ce112c68ec9da90e127bf423a4bb8cff5037968/payreq.js#L779-L780
So either the type should be changed to
X | null
or should actually useundefined
like the type declaration.