|
|
@@ -0,0 +1,29 @@
|
|
|
+// interface test {
|
|
|
+// aas: string
|
|
|
+// bbb: string[]
|
|
|
+// }
|
|
|
+//
|
|
|
+// const test = {
|
|
|
+// aas: '',
|
|
|
+// bbb: ['asd', '123123']
|
|
|
+// }
|
|
|
+//
|
|
|
+// function aa<T extends keyof test>(value: T): test[T] {
|
|
|
+// return test[value]
|
|
|
+// }
|
|
|
+//
|
|
|
+// aa('aas')
|
|
|
+
|
|
|
+interface Storage {
|
|
|
+ getItem(key: string): string | null;
|
|
|
+
|
|
|
+ setItem(key: string, value: string): void;
|
|
|
+
|
|
|
+ removeItem(key: string): void;
|
|
|
+
|
|
|
+ clear(): void;
|
|
|
+
|
|
|
+ token: string | null
|
|
|
+}
|
|
|
+
|
|
|
+declare var localStorage: Storage;
|