Skip to content

Commit

Permalink
修复错误注释,增强类型提示
Browse files Browse the repository at this point in the history
  • Loading branch information
1226085293 committed Apr 15, 2024
1 parent 7b2299c commit 4efcb86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions assets/@framework/mk_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ class mk_storage<CT extends Object> {
* 设置存储数据
* @param key_ 存储键
* @param data_ 存储数据
* @param effective_time_ms_n_ 失效时间
* @returns storage.status
* @returns 成功状态
*/
set<T extends keyof CT>(key_: T, data_: any): boolean {
set<T extends keyof CT, T2 extends CT[T]>(key_: T, data_: T2): boolean {
const key_s = String(key_);

try {
Expand Down
5 changes: 2 additions & 3 deletions declare/mk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2887,10 +2887,9 @@ declare namespace mk {
* 设置存储数据
* @param key_ 存储键
* @param data_ 存储数据
* @param effective_time_ms_n_ 失效时间
* @returns storage.status
* @returns 成功状态
*/
set<T extends keyof CT>(key_: T, data_: any): boolean;
set<T extends keyof CT, T2 extends CT[T]>(key_: T, data_: T2): boolean;
/**
* 获取数据
* @param key_ 存储键
Expand Down

0 comments on commit 4efcb86

Please sign in to comment.