braintree / credit-card-type

A library for determining credit card type

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong return types for default exported function

aamirafridi opened this issue · comments

General information

  • Library version: 9.1.0
  • Browser and OS Chrome, Max OS

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...

it does return empty array. my bad