fix: 修复TS类型错误

This commit is contained in:
kailong321200875
2023-01-16 14:45:39 +08:00
parent 2800fb81c7
commit 1c06a27b90
7 changed files with 29 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ const TIME_AGO_MESSAGE_MAP: {
} = {
'zh-CN': {
justNow: '刚刚',
invalid: '无效时间',
past: (n) => (n.match(/\d/) ? `${n}` : n),
future: (n) => (n.match(/\d/) ? `${n}` : n),
month: (n, past) => (n === 1 ? (past ? '上个月' : '下个月') : `${n} 个月`),
@@ -20,6 +21,7 @@ const TIME_AGO_MESSAGE_MAP: {
},
en: {
justNow: '刚刚',
invalid: 'Invalid Date',
past: (n) => (n.match(/\d/) ? `${n} ago` : n),
future: (n) => (n.match(/\d/) ? `in ${n}` : n),
month: (n, past) =>