Skip to content

Commit 830d948

Browse files
committed
Add free functions to exports
1 parent bddca6b commit 830d948

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

packages/firestore/exp/test/shim.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ import {
7272
validateSetOptions
7373
} from '../../src/util/input_validation';
7474
import { Compat } from '../../src/compat/compat';
75-
import { LoadBundleTask } from '../../exp-types';
7675

7776
export { GeoPoint, Timestamp } from '../index';
7877
export { FieldValue } from '../../src/compat/field_value';
78+
export { loadBundle, namedQuery };
7979

8080
/* eslint-disable @typescript-eslint/no-explicit-any */
8181

@@ -172,17 +172,6 @@ export class FirebaseFirestore
172172
return terminate(this._delegate);
173173
}
174174

175-
loadBundle(
176-
bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string
177-
): LoadBundleTask {
178-
return loadBundle(this._delegate, bundleData)!;
179-
}
180-
181-
async namedQuery(name: string): Promise<Query | null> {
182-
const query = await namedQuery(this._delegate, name);
183-
return !!query ? new Query<legacy.DocumentData>(this, query) : null;
184-
}
185-
186175
INTERNAL = {
187176
delete: () => terminate(this._delegate)
188177
};

packages/firestore/test/integration/util/firebase_export.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,20 @@ const FieldValue = usesFunctionalApi()
116116
? exp.FieldValue
117117
: legacyNamespace.FieldValue;
118118
const Blob = usesFunctionalApi() ? exp.Blob : legacyNamespace.Blob;
119+
const loadBundle = usesFunctionalApi()
120+
? exp.loadBundle
121+
: legacyNamespace.loadBundle;
122+
const namedQuery = usesFunctionalApi()
123+
? exp.namedQuery
124+
: legacyNamespace.namedQuery;
119125

120-
export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint };
126+
export {
127+
Firestore,
128+
FieldValue,
129+
FieldPath,
130+
Timestamp,
131+
Blob,
132+
GeoPoint,
133+
loadBundle,
134+
namedQuery
135+
};

0 commit comments

Comments
 (0)