@square/web-payments-sdk-types
Version:
Types for Square's Web Payments SDK
28 lines (27 loc) • 1.52 kB
TypeScript
import type { PlaidMissingNameError } from '../errors/ach';
import type { VerifyBuyerError } from '../errors/analytics';
import type { ElementNotFoundError, InvalidEventListenerCallbackError, InvalidOptionError, InvalidPaymentRequestError, InvalidPaymentRequestUpdateError } from '../errors/api';
import type { BrowserNotSupportedError, WebSdkEmbedError } from '../errors/initialization';
import type { PaymentMethodUnsupportedError } from '../errors/payment-method-unsupported';
import type { TokenizationError } from '../errors/tokenization';
import type { UnexpectedError } from '../errors/unexpected';
/**
* The errors that can be thrown by the Web Payments SDK
*
* `PublicErrors` contains all of the error types that are thrown by the SDK.
*/
interface PublicErrors {
BrowserNotSupportedError: typeof BrowserNotSupportedError;
ElementNotFoundError: typeof ElementNotFoundError;
InvalidOptionError: typeof InvalidOptionError;
InvalidEventListenerCallbackError: typeof InvalidEventListenerCallbackError;
InvalidPaymentRequestError: typeof InvalidPaymentRequestError;
InvalidPaymentRequestUpdateError: typeof InvalidPaymentRequestUpdateError;
PaymentMethodUnsupportedError: typeof PaymentMethodUnsupportedError;
PlaidMissingNameError: typeof PlaidMissingNameError;
TokenizationError: typeof TokenizationError;
UnexpectedError: typeof UnexpectedError;
VerifyBuyerError: typeof VerifyBuyerError;
WebSdkEmbedError: typeof WebSdkEmbedError;
}
export { PublicErrors };