Skip to content

Commit

Permalink
added more precise return type
Browse files Browse the repository at this point in the history
  • Loading branch information
framitdavid committed Oct 25, 2024
1 parent 50fd70d commit 8ca15da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ScopedStorageImpl implements ScopedStorage {
);
}

public getItem<T>(key: keyof T): T {
public getItem<T>(key: keyof T): T | null {

Check failure on line 27 in frontend/libs/studio-pure-functions/src/ScopedStorage/ScopedStorage.ts

View workflow job for this annotation

GitHub Actions / Typechecking and linting

Property 'getItem' in type 'ScopedStorageImpl' is not assignable to the same property in base type 'ScopedStorage'.
const records: T = this.getAllRecordsInStorage();

if (!records) {
Expand Down

0 comments on commit 8ca15da

Please sign in to comment.