bitcoinjs / bolt11

A library for encoding and decoding lightning network payment requests as defined in BOLT #11.
MIT License
92 stars 64 forks source link

minor mistyping of PaymentRequestObject #20

Closed riperk closed 5 years ago

riperk commented 5 years ago

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 use undefined like the type declaration.

junderw commented 5 years ago

Thanks for the report!

junderw commented 5 years ago

Published as 1.2.6