Skip to content

Commit

Permalink
Add default generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Mar 28, 2024
1 parent 6c70ea5 commit f53aa4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/auth-client/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ export class IdbStorage implements AuthClientStorage {
});
}

public async get<T>(key: string): Promise<T | null> {
public async get<T = string>(key: string): Promise<T | null> {
const db = await this._db;
return await db.get<T>(key);
// return (await db.get<string>(key)) ?? null;
}

public async set<T>(key: string, value: T): Promise<void> {
public async set<T = string>(key: string, value: T): Promise<void> {
const db = await this._db;
await db.set(key, value);
}
Expand Down

0 comments on commit f53aa4c

Please sign in to comment.