serwist
Version:
A Swiss Army knife for service workers.
24 lines • 806 B
TypeScript
import type { MessageKey } from "../models/messages/messages.js";
import type { MapLikeObject } from "../types.js";
/**
* Serwist errors should be thrown with this class.
* This allows use to ensure the type easily in tests,
* helps developers identify errors from Serwist
* easily and allows use to optimise error
* messages correctly.
*
* @private
*/
export declare class SerwistError extends Error {
details?: MapLikeObject;
/**
*
* @param errorCode The error code that
* identifies this particular error.
* @param details Any relevant arguments
* that will help developers identify issues should
* be added as a key on the context object.
*/
constructor(errorCode: MessageKey, details?: MapLikeObject);
}
//# sourceMappingURL=SerwistError.d.ts.map