@firebase/util 1.4.3 → 1.5.0-canary.3198d58dc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare class DBWrapper {
21
+ private _db;
22
+ objectStoreNames: DOMStringList;
23
+ constructor(_db: IDBDatabase);
24
+ transaction(storeNames: string[] | string, mode?: IDBTransactionMode): TransactionWrapper;
25
+ createObjectStore(storeName: string, options?: IDBObjectStoreParameters): ObjectStoreWrapper;
26
+ close(): void;
27
+ }
28
+ /**
29
+ * @internal
30
+ */
31
+ declare class TransactionWrapper {
32
+ private _transaction;
33
+ complete: Promise<void>;
34
+ constructor(_transaction: IDBTransaction);
35
+ objectStore(storeName: string): ObjectStoreWrapper;
36
+ }
37
+ /**
38
+ * @internal
39
+ */
40
+ declare class ObjectStoreWrapper {
41
+ private _store;
42
+ constructor(_store: IDBObjectStore);
43
+ index(name: string): IndexWrapper;
44
+ createIndex(name: string, keypath: string, options: IDBIndexParameters): IndexWrapper;
45
+ get(key: string): Promise<unknown>;
46
+ put(value: unknown, key?: string): Promise<unknown>;
47
+ delete(key: string): Promise<unknown>;
48
+ clear(): Promise<unknown>;
49
+ }
50
+ /**
51
+ * @internal
52
+ */
53
+ declare class IndexWrapper {
54
+ private _index;
55
+ constructor(_index: IDBIndex);
56
+ get(key: string): Promise<unknown>;
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ export declare function openDB(dbName: string, dbVersion: number, upgradeCallback: (db: DBWrapper, oldVersion: number, newVersion: number | null, transaction: TransactionWrapper) => void): Promise<DBWrapper>;
62
+ /**
63
+ * @internal
64
+ */
65
+ export declare function deleteDB(dbName: string): Promise<void>;
66
+ export {};
@@ -69,7 +69,7 @@ export declare class FirebaseError extends Error {
69
69
  /** Custom data for this error. */
70
70
  customData?: Record<string, unknown> | undefined;
71
71
  /** The custom name for all FirebaseErrors. */
72
- readonly name = "FirebaseError";
72
+ readonly name: string;
73
73
  constructor(
74
74
  /** The error code for this error. */
75
75
  code: string, message: string,
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare class DBWrapper {
21
+ private _db;
22
+ objectStoreNames: DOMStringList;
23
+ constructor(_db: IDBDatabase);
24
+ transaction(storeNames: string[] | string, mode?: IDBTransactionMode): TransactionWrapper;
25
+ createObjectStore(storeName: string, options?: IDBObjectStoreParameters): ObjectStoreWrapper;
26
+ close(): void;
27
+ }
28
+ /**
29
+ * @internal
30
+ */
31
+ declare class TransactionWrapper {
32
+ private _transaction;
33
+ complete: Promise<void>;
34
+ constructor(_transaction: IDBTransaction);
35
+ objectStore(storeName: string): ObjectStoreWrapper;
36
+ }
37
+ /**
38
+ * @internal
39
+ */
40
+ declare class ObjectStoreWrapper {
41
+ private _store;
42
+ constructor(_store: IDBObjectStore);
43
+ index(name: string): IndexWrapper;
44
+ createIndex(name: string, keypath: string, options: IDBIndexParameters): IndexWrapper;
45
+ get(key: string): Promise<unknown>;
46
+ put(value: unknown, key?: string): Promise<unknown>;
47
+ delete(key: string): Promise<unknown>;
48
+ clear(): Promise<unknown>;
49
+ }
50
+ /**
51
+ * @internal
52
+ */
53
+ declare class IndexWrapper {
54
+ private _index;
55
+ constructor(_index: IDBIndex);
56
+ get(key: string): Promise<unknown>;
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ export declare function openDB(dbName: string, dbVersion: number, upgradeCallback: (db: DBWrapper, oldVersion: number, newVersion: number | null, transaction: TransactionWrapper) => void): Promise<DBWrapper>;
62
+ /**
63
+ * @internal
64
+ */
65
+ export declare function deleteDB(dbName: string): Promise<void>;
66
+ export {};
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "0.1.2"
9
+ }
10
+ ]
11
+ }