fix: 修复TS类型错误
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user