瀏覽代碼

no message

xiaochan 1 年之前
父節點
當前提交
51c985878f
共有 1 個文件被更改,包括 12 次插入2 次删除
  1. 12 2
      src/local-storage.d.ts

+ 12 - 2
src/local-storage.d.ts

@@ -15,14 +15,24 @@
 // aa('aas')
 
 interface Storage {
+
+    readonly length: number;
+
+    clear(): void;
+
     getItem(key: string): string | null;
 
-    setItem(key: string, value: string): void;
+    key(index: number): string | null;
 
     removeItem(key: string): void;
 
-    clear(): void;
+    setItem(key: string, value: string): void;
+
+    [name: string]: any;
 
+    /**
+     * 用户 token
+     */
     token: string | null
 }