@square/web-payments-sdk-types
Version:
Types for Square's Web Payments SDK
49 lines (48 loc) • 1.45 kB
TypeScript
import { SqError } from './types';
/**
* The specified element was not found
*/
export declare class ElementNotFoundError extends SqError {
/**
* @param {string} elementIdSelector - the Element ID not found.
*/
constructor(element: HTMLElement | string);
}
/**
* A `PaymentRequest` object is malformed
*/
export declare class InvalidPaymentRequestError extends SqError {
/**
* @param {string[][]} missingFields - an array of string tuples describing the missing property and its type
* @param {string[]} additionalErrors - an array of strings describing other validation errors
*/
constructor(missingFields?: string[][], additionalErrors?: string[]);
}
/**
* A `PaymentRequestUpdate` object is malformed.
*/
export declare class InvalidPaymentRequestUpdateError extends SqError {
/**
* @param {string[][]} missingFields - an array of string tuples describing the missing property and its type
*/
constructor(missingFields?: string[][]);
}
/**
* An `eventListener callback` is throwing an unexpected error.
*/
export declare class InvalidEventListenerCallbackError extends SqError {
/**
* @param {String} event
* @param {String} message
*/
constructor(event: string, message: string);
}
/**
* Invalid method parameter errors.
*/
export declare class InvalidOptionError extends SqError {
/**
* @inheritDoc
*/
constructor(optionName: string);
}