query-registry
Version:
Query the npm registry for packuments, manifests, packages and download counts
33 lines • 1.19 kB
TypeScript
import makeError, { BaseError } from 'make-error';
/**
* `FetchError` represents an error that happened when fetching a URL.
*
* The `instanceof` operator can be used to check for this error.
*/
export declare class FetchError extends BaseError {
/** URL originally fetched */
readonly url: string;
/** Response received */
readonly response: Response;
constructor(
/** URL originally fetched */
url: string,
/** Response received */
response: Response);
}
/**
* `InvalidPackageNameError` is thrown when the name of a package
* is not valid according to the npm registry naming rules.
*
* The `instanceof` operator can be used to check for this error.
*
* @see {@link https://www.npmjs.com/package/validate-npm-package-name}
*/
export declare const InvalidPackageNameError: makeError.Constructor<makeError.BaseError>;
/**
* `InvalidPackageVersionError` is thrown when a package's version does not exist.
*
* The `instanceof` operator can be used to check for this error.
*/
export declare const InvalidPackageVersionError: makeError.Constructor<makeError.BaseError>;
//# sourceMappingURL=errors.d.ts.map