Skip to content

Commit

Permalink
修复(lib): 类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
secext2022 committed May 15, 2024
1 parent 57ab16b commit f4fcdeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deno.lock
7 changes: 5 additions & 2 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class Conf {
*/
async conf_get(键列表: Array<string>): Promise<{ [k: string]: unknown }> {
const = 键列表.map((k) =>
([] as Array<string>).concat(this._k_conf, [k])
([] as Array<unknown>).concat(this._k_conf, [k]) as Deno.KvKey
);
const 数据 = await 读取多键1(this._kv, );

Expand All @@ -45,7 +45,10 @@ export class Conf {
const t = this._kv.atomic();

for (const i of Object.keys(数据)) {
t.set(([] as Array<string>).concat(this._k_conf, [i]), 数据[i]);
t.set(
([] as Array<unknown>).concat(this._k_conf, [i]) as Deno.KvKey,
数据[i],
);
}

const r = await t.commit();
Expand Down

0 comments on commit f4fcdeb

Please sign in to comment.