From b7e329ad9f382f00d6bd64146165b28372434ac6 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Fri, 9 Feb 2024 00:01:30 +0700 Subject: [PATCH] fix: fix multiple type errors --- src/def.d.ts | 4 ++-- src/lib/storage/index.ts | 2 +- tsconfig.json | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/def.d.ts b/src/def.d.ts index 77bc58f..e9fb06e 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -486,7 +486,7 @@ interface VendettaObject { }; storage: { createProxy: (target: T) => { proxy: T, emitter: Emitter }; - useProxy: (storage: T) => T; + useProxy: (storage: T & { [key: symbol]: any }) => T; createStorage: (backend: StorageBackend) => Promise>; wrapSync: >(store: T) => Awaited; awaitSyncWrapper: (store: any) => Promise; @@ -514,7 +514,7 @@ declare global { const __vendettaVersion: string; interface Window { - [key: PropertyKey]: any; + [key: Exclude]: any; modules: MetroModules; vendetta: VendettaObject; React: typeof _React; diff --git a/src/lib/storage/index.ts b/src/lib/storage/index.ts index 07d4072..ab161a8 100644 --- a/src/lib/storage/index.ts +++ b/src/lib/storage/index.ts @@ -81,7 +81,7 @@ export function useProxy(storage: T & { [key: symbol]: any }): T { return storage; } -export async function createStorage(backend: StorageBackend): Promise> { +export async function createStorage(backend: StorageBackend): Promise> { const data = await backend.get(); const { proxy, emitter } = createProxy(data); diff --git a/tsconfig.json b/tsconfig.json index 9410367..7969e9b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,7 @@ "strict": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, + "skipLibCheck": true, "paths": { "@/*": ["src/*"], "@types": ["src/def.d.ts"],