From 59ac258272a02e27be8b5fb7a13d4b2b1e1ba8ea Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 12 Sep 2021 22:54:15 +0900 Subject: [PATCH] drive-file --- src/models/repositories/drive-file.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 63bd020cbe..ddf9a46afd 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -4,14 +4,12 @@ import { Users, DriveFolders } from '../index'; import { User } from '@/models/entities/user'; import { toPuny } from '@/misc/convert-host'; import { awaitAll } from '@/prelude/await-all'; -import { SchemaType } from '@/misc/schema'; +import { Packed } from '@/misc/schema'; import config from '@/config/index'; import { query, appendQuery } from '@/prelude/url'; import { Meta } from '@/models/entities/meta'; import { fetchMeta } from '@/misc/fetch-meta'; -export type PackedDriveFile = SchemaType; - type PackOptions = { detail?: boolean, self?: boolean, @@ -99,12 +97,12 @@ export class DriveFileRepository extends Repository { return parseInt(sum, 10) || 0; } - public async pack(src: DriveFile['id'], options?: PackOptions): Promise; - public async pack(src: DriveFile, options?: PackOptions): Promise; + public async pack(src: DriveFile['id'], options?: PackOptions): Promise | null>; + public async pack(src: DriveFile, options?: PackOptions): Promise>; public async pack( src: DriveFile['id'] | DriveFile, options?: PackOptions - ): Promise { + ): Promise | null> { const opts = Object.assign({ detail: false, self: false