mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 21:40:45 +01:00
3fd2b55406
This reverts commit 89eea5df52
.
13 lines
294 B
TypeScript
13 lines
294 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
|
|
}
|