UNPKG

1.19 kBTypeScriptView Raw
1import makeError, { BaseError } from 'make-error';
2/**
3 * `FetchError` represents an error that happened when fetching a URL.
4 *
5 * The `instanceof` operator can be used to check for this error.
6 */
7export declare class FetchError extends BaseError {
8 /** URL originally fetched */
9 readonly url: string;
10 /** Response received */
11 readonly response: Response;
12 constructor(
13 /** URL originally fetched */
14 url: string,
15 /** Response received */
16 response: Response);
17}
18/**
19 * `InvalidPackageNameError` is thrown when the name of a package
20 * is not valid according to the npm registry naming rules.
21 *
22 * The `instanceof` operator can be used to check for this error.
23 *
24 * @see {@link https://www.npmjs.com/package/validate-npm-package-name}
25 */
26export declare const InvalidPackageNameError: makeError.Constructor<makeError.BaseError>;
27/**
28 * `InvalidPackageVersionError` is thrown when a package's version does not exist.
29 *
30 * The `instanceof` operator can be used to check for this error.
31 */
32export declare const InvalidPackageVersionError: makeError.Constructor<makeError.BaseError>;
33//# sourceMappingURL=errors.d.ts.map
\No newline at end of file