mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: contest: simplify
This commit is contained in:
1 parent
534fc4bb3b
commit
8024122e8f
9 files changed
+32
-62
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user