Add documentation for an optional handleStorageChange method in StorageApi

Signed-off-by: Dawit Ameneshewa <dawitam11@gmail.com>
This commit is contained in:
Dawit Ameneshewa
2022-12-07 09:44:15 +03:00
parent e5dec1b386
commit bc2f9ad271
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -558,6 +558,8 @@ export class WebStorage implements StorageApi {
// (undocumented)
get<T>(key: string): T | undefined;
// (undocumented)
handleStorageChange(eventKey: StorageEvent['key']): void;
// (undocumented)
observe$<T extends JsonValue>(
key: string,
): Observable<StorageValueSnapshot<T>>;
+1
View File
@@ -697,6 +697,7 @@ export type SignInPageProps = {
// @public
export interface StorageApi {
forBucket(name: string): StorageApi;
handleStorageChange?(eventKey: StorageEvent['key']): void;
observe$<T extends JsonValue>(
key: string,
): Observable<StorageValueSnapshot<T>>;
@@ -91,7 +91,7 @@ export interface StorageApi {
*
* @param eventKey - The key of a storage event object
*/
handleStorageChange(eventKey: StorageEvent['key']): void;
handleStorageChange?(eventKey: StorageEvent['key']): void;
/**
* Returns an immediate snapshot value for the given key, if possible.