tryError Documentation
Function: createAmountError()
Function
```ts function createAmountError<T>( amount, currency, errorType, message, options? ): AmountError<T>; ``` Defined in: [factories.ts:484](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/factories.ts#L484) Pre-built factory for amount-related errors with validation
tryError API Documentation v0.0.1-alpha.1
tryError API Documentation / createAmountError
Function: createAmountError()
function createAmountError<T>(
amount,
currency,
errorType,
message,
options?
): AmountError<T>;
Defined in: factories.ts:484
Pre-built factory for amount-related errors with validation
Type Parameters
T
T
extends string
Parameters
amount
number
currency
string
errorType
T
message
string
options?
Returns
AmountError
<T
>
Example
const paymentError = createAmountError(
99.99,
"USD",
"InsufficientFunds",
"Insufficient funds"
);