axios-miniprogram/src/cancel/Cancel.ts

21 lines
436 B
TypeScript
Raw Normal View History

2020-04-14 23:45:21 +08:00
/*
* @Author: early-autumn
* @Date: 2020-04-13 21:14:53
* @LastEditors: early-autumn
2020-05-02 15:47:38 +08:00
* @LastEditTime: 2020-04-25 09:26:10
2020-04-14 23:45:21 +08:00
*/
import { Cancel } from '../types';
export default class CancelStatic implements Cancel {
2020-04-24 09:24:43 +08:00
/**
* @param message
*/
2020-05-02 15:47:38 +08:00
public constructor(public message?: string) {}
2020-04-14 23:45:21 +08:00
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}`;
}
}