Skip to content

Commit 1956f75

Browse files
committed
修复 TS 类型注释错误
1 parent 121edc7 commit 1956f75

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

projects/pixiv/src/base.jsLib.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,15 @@ export function saveLikeAuthorsMap(likeAuthorsMap: Map<string, string>): void {
517517
* @param saveSeconds 缓存时间
518518
*/
519519
export function putInCacheMap(
520-
mapName: String,
520+
mapName: string,
521521
mapObject: Map<string, string>,
522-
saveSeconds?: Number,
522+
saveSeconds?: number,
523523
) {
524524
// @ts-ignore
525525
const { cache }: { cache: CacheManager } = this;
526526
let orderedArray: Array<Record<string, string>> = [];
527527
mapObject.forEach((value, key) => {
528-
const item = {};
528+
const item: Record<string, string> = {};
529529
item[key] = value;
530530
orderedArray.push(item);
531531
});
@@ -538,7 +538,7 @@ export function putInCacheMap(
538538
* 将 Map 转换为有序数组格式并保存到缓存
539539
* @param mapName 用户ID到用户名的映射
540540
*/
541-
export function getFromCacheMap(mapName: String) {
541+
export function getFromCacheMap(mapName: string) {
542542
// @ts-ignore
543543
const { cache }: { cache: CacheManager } = this;
544544
let cached = cache.get(mapName);

0 commit comments

Comments
 (0)