mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
refactor: fix types
This commit is contained in:
parent
51aad804d6
commit
93cb26e879
@ -266,7 +266,7 @@ export default abstract class Chart<T extends Schema> {
|
||||
const currentLog = await repository.findOne({
|
||||
date: Chart.dateToTimestamp(current),
|
||||
...(group ? { group: group } : {}),
|
||||
}) as RawRecord<T>;
|
||||
}) as RawRecord<T> | undefined;
|
||||
|
||||
// ログがあればそれを返して終了
|
||||
if (currentLog != null) {
|
||||
@ -306,7 +306,7 @@ export default abstract class Chart<T extends Schema> {
|
||||
const currentLog = await repository.findOne({
|
||||
date: date,
|
||||
...(group ? { group: group } : {}),
|
||||
}) as RawRecord<T>;
|
||||
}) as RawRecord<T> | undefined;
|
||||
|
||||
// ログがあればそれを返して終了
|
||||
if (currentLog != null) return currentLog;
|
||||
@ -576,7 +576,7 @@ export default abstract class Chart<T extends Schema> {
|
||||
order: {
|
||||
date: -1,
|
||||
},
|
||||
}) as RawRecord<T>;
|
||||
}) as RawRecord<T> | undefined;
|
||||
|
||||
if (recentLog) {
|
||||
logs = [recentLog];
|
||||
@ -593,7 +593,7 @@ export default abstract class Chart<T extends Schema> {
|
||||
order: {
|
||||
date: -1,
|
||||
},
|
||||
}) as RawRecord<T>;
|
||||
}) as RawRecord<T> | undefined;
|
||||
|
||||
if (outdatedLog) {
|
||||
logs.push(outdatedLog);
|
||||
|
Loading…
Reference in New Issue
Block a user