docs: fixed typos in jsdocs (#4421).

This commit is contained in:
Richard Moore 2023-11-02 14:32:39 -04:00
parent 85a039f180
commit 5d62591796

@ -20,7 +20,7 @@ import type { FetchRequest, FetchResponse } from "./fetch.js";
/** /**
* An error may contain additional properties, but those must not * An error may contain additional properties, but those must not
* conflict with any impliciat properties. * conflict with any implicit properties.
*/ */
export type ErrorInfo<T> = Omit<T, "code" | "name" | "message" | "shortMessage"> & { shortMessage?: string }; export type ErrorInfo<T> = Omit<T, "code" | "name" | "message" | "shortMessage"> & { shortMessage?: string };
@ -67,7 +67,7 @@ function stringify(value: any): any {
/** /**
* All errors emitted by ethers have an **ErrorCode** to help * All errors emitted by ethers have an **ErrorCode** to help
* identify and coalesce errors to simplfy programatic analysis. * identify and coalesce errors to simplify programmatic analysis.
* *
* Each **ErrorCode** is the %%code%% proerty of a coresponding * Each **ErrorCode** is the %%code%% proerty of a coresponding
* [[EthersError]]. * [[EthersError]].
@ -202,7 +202,7 @@ export interface NotImplementedError extends EthersError<"NOT_IMPLEMENTED"> {
/** /**
* This Error indicates that the attempted operation is not supported. * This Error indicates that the attempted operation is not supported.
* *
* This could range from a specifc JSON-RPC end-point not supporting * This could range from a specific JSON-RPC end-point not supporting
* a feature to a specific configuration of an object prohibiting the * a feature to a specific configuration of an object prohibiting the
* operation. * operation.
* *
@ -217,7 +217,7 @@ export interface UnsupportedOperationError extends EthersError<"UNSUPPORTED_OPER
} }
/** /**
* This Error indicates a proplem connecting to a network. * This Error indicates a problem connecting to a network.
*/ */
export interface NetworkError extends EthersError<"NETWORK_ERROR"> { export interface NetworkError extends EthersError<"NETWORK_ERROR"> {
/** /**
@ -269,7 +269,7 @@ export interface TimeoutError extends EthersError<"TIMEOUT"> {
/** /**
* This Error indicates that a provided set of data cannot * This Error indicates that a provided set of data cannot
* be correctly interpretted. * be correctly interpreted.
*/ */
export interface BadDataError extends EthersError<"BAD_DATA"> { export interface BadDataError extends EthersError<"BAD_DATA"> {
/** /**
@ -617,7 +617,7 @@ export type CodedEthersError<T> =
* Returns true if the %%error%% matches an error thrown by ethers * Returns true if the %%error%% matches an error thrown by ethers
* that matches the error %%code%%. * that matches the error %%code%%.
* *
* In TypeScript envornoments, this can be used to check that %%error%% * In TypeScript environments, this can be used to check that %%error%%
* matches an EthersError type, which means the expected properties will * matches an EthersError type, which means the expected properties will
* be set. * be set.
* *
@ -645,13 +645,13 @@ export function isCallException(error: any): error is CallExceptionError {
/** /**
* Returns a new Error configured to the format ethers emits errors, with * Returns a new Error configured to the format ethers emits errors, with
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
* for the corresponding EthersError. * for the corresponding EthersError.
* *
* Each error in ethers includes the version of ethers, a * Each error in ethers includes the version of ethers, a
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional * machine-readable [[ErrorCode]], and depending on %%code%%, additional
* required properties. The error message will also include the %%meeage%%, * required properties. The error message will also include the %%message%%,
* ethers version, %%code%% and all aditional properties, serialized. * ethers version, %%code%% and all additional properties, serialized.
*/ */
export function makeError<K extends ErrorCode, T extends CodedEthersError<K>>(message: string, code: K, info?: ErrorInfo<T>): T { export function makeError<K extends ErrorCode, T extends CodedEthersError<K>>(message: string, code: K, info?: ErrorInfo<T>): T {
let shortMessage = message; let shortMessage = message;