Object.assign(Boolean.prototype, { toText: function (this: boolean): string | undefined { if (this === true) { return '是'; } else if (this === false) { return '否'; } return undefined; } });