chore: Removing some any
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { Primitive } from "utility-types";
|
||||
|
||||
/**
|
||||
* Storage is a wrapper class for localStorage that allow safe usage when
|
||||
* localStorage is not available.
|
||||
@@ -41,7 +43,7 @@ class Storage {
|
||||
* @param fallback The fallback value if the key doesn't exist.
|
||||
* @returns The value or undefined if it doesn't exist.
|
||||
*/
|
||||
public get(key: string, fallback?: any) {
|
||||
public get(key: string, fallback?: Primitive) {
|
||||
try {
|
||||
const value = this.interface.getItem(key);
|
||||
if (typeof value === "string") {
|
||||
@@ -79,7 +81,7 @@ class MemoryStorage {
|
||||
return this.data[key] || null;
|
||||
}
|
||||
|
||||
setItem(key: string, value: any) {
|
||||
setItem(key: string, value: Primitive) {
|
||||
return (this.data[key] = String(value));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user