refactor(backend): Array.prototype.filter
での非null確認ではisNotNull
関数を使うように (#13442)
* `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように * `{}` -> `NonNullable<unknown>`
This commit is contained in:
@@ -259,7 +259,7 @@ export class DriveFileEntityService {
|
||||
options?: PackOptions,
|
||||
): Promise<Packed<'DriveFile'>[]> {
|
||||
const items = await Promise.all(files.map(f => this.packNullable(f, options)));
|
||||
return items.filter((x): x is Packed<'DriveFile'> => x != null);
|
||||
return items.filter(isNotNull);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
Reference in New Issue
Block a user