braintree / credit-card-type

A library for determining credit card type
MIT License
980 stars 154 forks source link

Wrong return types for default exported function #117

Closed aamirafridi closed 3 years ago

aamirafridi commented 3 years ago

General information

Wrong return types for default exported function

In your types file:

declare function creditCardType(cardNumber: string): Array<CreditCardType>;

But it can return undefined e.g. if you provide a card number 000...

aamirafridi commented 3 years ago

it does return empty array. my bad