mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-02 14:13:08 +02:00
13 lines
290 B
TypeScript
13 lines
290 B
TypeScript
export class RequestCanceledError extends Error {
|
|
public isCancel: boolean;
|
|
|
|
constructor(msg: string) {
|
|
super(msg);
|
|
this.isCancel = true;
|
|
Object.setPrototypeOf(this, RequestCanceledError);
|
|
}
|
|
}
|
|
|
|
export const isCancel = (value: any): boolean => {
|
|
return value && value.isCancel;
|
|
};
|