core: contest: simplify

This commit is contained in:
undefined committed 2022-12-22 23:38:32 +08:00
1 parent 534fc4bb3b
commit 8024122e8f
9 files changed
+32 -62

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import { Cursor } from 'mongodb';
type ranked = <T>(cursor: Cursor<T>, equ: ((a: T, b: T) => boolean)) => Promise<[number, T][]>;
type ranked = <T extends Record<string, any>>(cursor: Cursor<T>, equ: ((a: T, b: T) => boolean)) => Promise<[number, T][]>;
const ranked: ranked = async (cursor, equ) => {
let last = null;