そもそもPacked<'...'>は常にSerializedである

This commit is contained in:
tamaina
2023-06-04 18:39:39 +00:00
parent 4a104af304
commit edc38fc2c7
25 changed files with 78 additions and 100 deletions

View File

@@ -3,7 +3,6 @@ import { DI } from '@/di-symbols.js';
import type { FollowingsRepository } from '@/models/index.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from 'misskey-js';
import type { Serialized } from 'schema-type';
import type { User } from '@/models/entities/User.js';
import type { Following } from '@/models/entities/Following.js';
import { bindThis } from '@/decorators.js';
@@ -71,7 +70,7 @@ export class FollowingEntityService {
populateFollowee?: boolean;
populateFollower?: boolean;
},
): Promise<Serialized<Packed<'Following'>>> {
): Promise<Packed<'Following'>> {
const following = typeof src === 'object' ? src : await this.followingsRepository.findOneByOrFail({ id: src });
if (opts == null) opts = {};