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

+2 -2
View File
@@ -39,7 +39,7 @@
"moment-timezone": "^0.5.34",
"mongodb": "^3.7.3",
"nanoid": "^4.0.0",
"nodemailer": "^6.7.7",
"nodemailer": "^6.7.8",
"notp": "^2.0.3",
"p-queue": "^7.3.0",
"path-to-regexp": "^6.2.1",
@@ -66,7 +66,7 @@
"@types/mongodb": "^3.6.20",
"@types/nodemailer": "^6.4.5",
"@types/notp": "^2.0.2",
"@types/semver": "^7.3.10",
"@types/semver": "^7.3.12",
"@types/serialize-javascript": "^5.0.2",
"@types/superagent": "^4.1.15",
"moment": "^2.29.4",
+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] },