File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
packages/firestore/src/util Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -556,14 +556,6 @@ export type TaskState = 'Error' | 'Running' | 'Success';
556
556
// @public
557
557
export function terminate(firestore : Firestore ): Promise <void >;
558
558
559
- // @public
560
- export class _TestingHooks {
561
- static getOrCreateInstance(): _TestingHooks ;
562
- static get instance(): _TestingHooks | null ;
563
- notifyOnExistenceFilterMismatch(arg : unknown ): void ;
564
- onExistenceFilterMismatch(callback : (arg : unknown ) => void ): () => void ;
565
- }
566
-
567
559
// @public
568
560
export class Timestamp {
569
561
constructor (
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- let gTestingHooksSingletonInstance : TestingHooks | null = null ;
19
-
20
18
/**
21
19
* Manages "testing hooks", hooks into the internals of the SDK to verify
22
20
* internal state and events during integration tests. Do not use this class
@@ -31,6 +29,8 @@ let gTestingHooksSingletonInstance: TestingHooks | null = null;
31
29
* Use the former method if the caller should "do nothing" there are no testing
32
30
* hooks registered. Use the latter if the instance is needed to, for example,
33
31
* register a testing hook.
32
+ *
33
+ * @internal
34
34
*/
35
35
export class TestingHooks {
36
36
private readonly onExistenceFilterMismatchCallbacks : Array <
@@ -81,8 +81,15 @@ export class TestingHooks {
81
81
82
82
/**
83
83
* Invokes all currently-registered `onExistenceFilterMismatch` callbacks.
84
+ * @param arg the argument to specify to the callbacks; the type of this
85
+ * argument is intentionally declared as `unknown` to discourage casual use;
86
+ * the specific use of this callback in tests knows the structure of the
87
+ * given argument and will use it accordingly.
84
88
*/
85
89
notifyOnExistenceFilterMismatch ( arg : unknown ) : void {
86
90
this . onExistenceFilterMismatchCallbacks . forEach ( callback => callback ( arg ) ) ;
87
91
}
88
92
}
93
+
94
+ /** The global singleton instance of `TestingHooks`. */
95
+ let gTestingHooksSingletonInstance : TestingHooks | null = null ;
You can’t perform that action at this time.
0 commit comments