workspace: upgrade toolchain

This commit is contained in:
undefined committed 2022-08-13 21:19:41 +08:00
1 parent 7df24629dd
commit 267455667f
8 files changed
+42 -35

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ async function get(ctx: Context) {
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="msapplication-TileColor" content="#579e9a">
<meta name="theme-color" content="#56758f">
<link rel="stylesheet" media="all" href="/vj4.css">
<link rel="stylesheet" media="all" href="/default.theme.css">
<title>Setup</title>
</head>
<body>
+2 -2
View File
@@ -233,7 +233,7 @@ export async function getSub<T extends keyof DocType, K extends ArrayKeys<DocTyp
return [doc, null];
}
export async function setSub<T extends keyof DocType, K extends ArrayKeys<DocType[T]>>(
export async function setSub<T extends keyof DocType, K extends string & ArrayKeys<DocType[T]>>(
domainId: string, docType: T, docId: DocType[T]['docId'],
key: K, subId: DocType[T][K][0]['_id'], args: Partial<DocType[T][K][0]>,
): Promise<DocType[T]> {
@@ -367,7 +367,7 @@ export async function incStatus<T extends keyof DocStatusType>(
export async function revPushStatus<T extends keyof DocStatusType>(
domainId: string, docType: T, docId: DocStatusType[T]['docId'], uid: number,
key: ArrayKeys<DocStatusType[T]>, value: any, id = '_id',
key: string & ArrayKeys<DocStatusType[T]>, value: any, id = '_id',
): Promise<DocStatusType[T]> {
let res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid, [`${key}.${id}`]: value[id] },