2020-04-14 23:45:21 +08:00
|
|
|
/*
|
|
|
|
* @Author: early-autumn
|
|
|
|
* @Date: 2020-04-13 21:14:53
|
|
|
|
* @LastEditors: early-autumn
|
2020-04-23 10:46:45 +08:00
|
|
|
* @LastEditTime: 2020-04-22 17:38:43
|
2020-04-14 23:45:21 +08:00
|
|
|
*/
|
|
|
|
import { Cancel } from '../types';
|
|
|
|
|
|
|
|
export default class CancelStatic implements Cancel {
|
2020-04-23 10:46:45 +08:00
|
|
|
public message?: string;
|
2020-04-14 23:45:21 +08:00
|
|
|
|
|
|
|
constructor(message?: string) {
|
|
|
|
this.message = message;
|
|
|
|
}
|
|
|
|
|
2020-04-23 10:46:45 +08:00
|
|
|
public toString() {
|
2020-04-14 23:45:21 +08:00
|
|
|
const message = this.message ? `: ${this.message}` : '';
|
|
|
|
|
|
|
|
return `Cancel${message}`;
|
|
|
|
}
|
|
|
|
}
|