@@ -20,7 +20,7 @@ import type { FetchRequest, FetchResponse } from "./fetch.js";
20
20
21
21
/**
22
22
* An error may contain additional properties, but those must not
23
- * conflict with any impliciat properties.
23
+ * conflict with any implicit properties.
24
24
*/
25
25
export type ErrorInfo < T > = Omit < T , "code" | "name" | "message" | "shortMessage" > & { shortMessage ?: string } ;
26
26
@@ -67,7 +67,7 @@ function stringify(value: any): any {
67
67
68
68
/**
69
69
* All errors emitted by ethers have an **ErrorCode** to help
70
- * identify and coalesce errors to simplfy programatic analysis.
70
+ * identify and coalesce errors to simplify programmatic analysis.
71
71
*
72
72
* Each **ErrorCode** is the %%code%% proerty of a coresponding
73
73
* [[EthersError]].
@@ -202,7 +202,7 @@ export interface NotImplementedError extends EthersError<"NOT_IMPLEMENTED"> {
202
202
/**
203
203
* This Error indicates that the attempted operation is not supported.
204
204
*
205
- * This could range from a specifc JSON-RPC end-point not supporting
205
+ * This could range from a specific JSON-RPC end-point not supporting
206
206
* a feature to a specific configuration of an object prohibiting the
207
207
* operation.
208
208
*
@@ -217,7 +217,7 @@ export interface UnsupportedOperationError extends EthersError<"UNSUPPORTED_OPER
217
217
}
218
218
219
219
/**
220
- * This Error indicates a proplem connecting to a network.
220
+ * This Error indicates a problem connecting to a network.
221
221
*/
222
222
export interface NetworkError extends EthersError < "NETWORK_ERROR" > {
223
223
/**
@@ -269,7 +269,7 @@ export interface TimeoutError extends EthersError<"TIMEOUT"> {
269
269
270
270
/**
271
271
* This Error indicates that a provided set of data cannot
272
- * be correctly interpretted .
272
+ * be correctly interpreted .
273
273
*/
274
274
export interface BadDataError extends EthersError < "BAD_DATA" > {
275
275
/**
@@ -617,7 +617,7 @@ export type CodedEthersError<T> =
617
617
* Returns true if the %%error%% matches an error thrown by ethers
618
618
* that matches the error %%code%%.
619
619
*
620
- * In TypeScript envornoments , this can be used to check that %%error%%
620
+ * In TypeScript environments , this can be used to check that %%error%%
621
621
* matches an EthersError type, which means the expected properties will
622
622
* be set.
623
623
*
@@ -645,13 +645,13 @@ export function isCallException(error: any): error is CallExceptionError {
645
645
646
646
/**
647
647
* Returns a new Error configured to the format ethers emits errors, with
648
- * the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
648
+ * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
649
649
* for the corresponding EthersError.
650
650
*
651
651
* Each error in ethers includes the version of ethers, a
652
- * machine-readable [[ErrorCode]], and depneding on %%code%%, additional
653
- * required properties. The error message will also include the %%meeage %%,
654
- * ethers version, %%code%% and all aditional properties, serialized.
652
+ * machine-readable [[ErrorCode]], and depending on %%code%%, additional
653
+ * required properties. The error message will also include the %%message %%,
654
+ * ethers version, %%code%% and all additional properties, serialized.
655
655
*/
656
656
export function makeError < K extends ErrorCode , T extends CodedEthersError < K > > ( message : string , code : K , info ?: ErrorInfo < T > ) : T {
657
657
let shortMessage = message ;
0 commit comments