Skip to content

Commit cd59b6e

Browse files
committed
Merge branch 'ch-ts-upgrade' of https://github.com/firebase/firebase-js-sdk into ch-ts-upgrade
2 parents bd382a7 + d7cdb86 commit cd59b6e

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

common/api-review/database.api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ export function connectDatabaseEmulator(db: Database, host: string, port: number
1717

1818
// @public
1919
export class Database {
20+
;
2021
readonly app: FirebaseApp;
22+
;
23+
;
2124
readonly 'type' = "database";
25+
;
26+
;
27+
;
28+
;
2229
}
2330

2431
// @public
@@ -30,6 +37,8 @@ export interface DatabaseReference extends Query {
3037

3138
// @public
3239
export class DataSnapshot {
40+
;
41+
;
3342
child(path: string): DataSnapshot;
3443
exists(): boolean;
3544
exportVal(): any;
@@ -137,6 +146,8 @@ export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot)
137146

138147
// @public
139148
export class OnDisconnect {
149+
;
150+
;
140151
cancel(): Promise<void>;
141152
remove(): Promise<void>;
142153
set(value: unknown): Promise<void>;
@@ -177,6 +188,11 @@ export interface Query {
177188
readonly ref: DatabaseReference;
178189
toJSON(): string;
179190
toString(): string;
191+
;
192+
;
193+
;
194+
;
195+
;
180196
}
181197

182198
// @public
@@ -185,6 +201,7 @@ export function query(query: Query, ...queryConstraints: QueryConstraint[]): Que
185201
// @public
186202
export abstract class QueryConstraint {
187203
abstract readonly type: QueryConstraintType;
204+
;
188205
}
189206

190207
// @public

common/api-review/firestore-lite.api.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export type AggregateFieldType = AggregateField<number>;
2727

2828
// @public
2929
export class AggregateQuerySnapshot<T extends AggregateSpec> {
30+
;
3031
data(): AggregateSpecData<T>;
3132
readonly query: Query<unknown>;
3233
readonly type = "AggregateQuerySnapshot";
@@ -54,6 +55,7 @@ export function arrayUnion(...elements: unknown[]): FieldValue;
5455

5556
// @public
5657
export class Bytes {
58+
;
5759
static fromBase64String(base64: string): Bytes;
5860
static fromUint8Array(array: Uint8Array): Bytes;
5961
isEqual(other: Bytes): boolean;
@@ -79,6 +81,7 @@ export function collectionGroup(firestore: Firestore, collectionId: string): Que
7981

8082
// @public
8183
export class CollectionReference<T = DocumentData> extends Query<T> {
84+
;
8285
get id(): string;
8386
get parent(): DocumentReference<DocumentData> | null;
8487
get path(): string;
@@ -117,9 +120,11 @@ export function documentId(): FieldPath;
117120

118121
// @public
119122
export class DocumentReference<T = DocumentData> {
123+
;
120124
readonly converter: FirestoreDataConverter<T> | null;
121125
readonly firestore: Firestore;
122126
get id(): string;
127+
;
123128
get parent(): CollectionReference<T>;
124129
get path(): string;
125130
readonly type = "document";
@@ -129,6 +134,11 @@ export class DocumentReference<T = DocumentData> {
129134

130135
// @public
131136
export class DocumentSnapshot<T = DocumentData> {
137+
;
138+
;
139+
;
140+
;
141+
;
132142
protected constructor();
133143
data(): T | undefined;
134144
exists(): this is QueryDocumentSnapshot<T>;
@@ -153,20 +163,38 @@ export function endBefore(...fieldValues: unknown[]): QueryConstraint;
153163

154164
// @public
155165
export class FieldPath {
166+
;
156167
constructor(...fieldNames: string[]);
157168
isEqual(other: FieldPath): boolean;
158169
}
159170

160171
// @public
161172
export abstract class FieldValue {
173+
;
162174
abstract isEqual(other: FieldValue): boolean;
175+
;
163176
}
164177

165178
// @public
166179
export class Firestore {
180+
;
181+
;
182+
;
183+
;
184+
;
185+
;
186+
;
187+
;
167188
get app(): FirebaseApp;
168189
toJSON(): object;
190+
;
191+
;
192+
;
193+
;
194+
;
195+
;
169196
type: 'firestore-lite' | 'firestore';
197+
;
170198
}
171199

172200
// @public
@@ -188,6 +216,8 @@ export type FirestoreErrorCode = 'cancelled' | 'unknown' | 'invalid-argument' |
188216

189217
// @public
190218
export class GeoPoint {
219+
;
220+
;
191221
constructor(latitude: number, longitude: number);
192222
isEqual(other: GeoPoint): boolean;
193223
get latitude(): number;
@@ -196,6 +226,7 @@ export class GeoPoint {
196226
latitude: number;
197227
longitude: number;
198228
};
229+
;
199230
}
200231

201232
// @public
@@ -251,6 +282,7 @@ export type Primitive = string | number | boolean | undefined | null;
251282
// @public
252283
export class Query<T = DocumentData> {
253284
protected constructor();
285+
;
254286
readonly converter: FirestoreDataConverter<T> | null;
255287
readonly firestore: Firestore;
256288
readonly type: 'query' | 'collection';
@@ -264,6 +296,7 @@ export function query<T>(query: Query<T>, ...queryConstraints: QueryConstraint[]
264296
// @public
265297
export abstract class QueryConstraint {
266298
abstract readonly type: QueryConstraintType;
299+
;
267300
}
268301

269302
// @public
@@ -280,6 +313,7 @@ export function queryEqual<T>(left: Query<T>, right: Query<T>): boolean;
280313

281314
// @public
282315
export class QuerySnapshot<T = DocumentData> {
316+
;
283317
get docs(): Array<QueryDocumentSnapshot<T>>;
284318
get empty(): boolean;
285319
forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
@@ -349,6 +383,7 @@ export class Timestamp {
349383
static now(): Timestamp;
350384
readonly seconds: number;
351385
toDate(): Date;
386+
;
352387
toJSON(): {
353388
seconds: number;
354389
nanoseconds: number;
@@ -360,6 +395,9 @@ export class Timestamp {
360395

361396
// @public
362397
export class Transaction {
398+
;
399+
;
400+
;
363401
delete(documentRef: DocumentReference<unknown>): this;
364402
get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
365403
set<T>(documentRef: DocumentReference<T>, data: WithFieldValue<T>): this;
@@ -400,12 +438,18 @@ export type WithFieldValue<T> = T | (T extends Primitive ? T : T extends {} ? {
400438

401439
// @public
402440
export class WriteBatch {
441+
;
442+
;
443+
;
444+
;
445+
;
403446
commit(): Promise<void>;
404447
delete(documentRef: DocumentReference<unknown>): WriteBatch;
405448
set<T>(documentRef: DocumentReference<T>, data: WithFieldValue<T>): WriteBatch;
406449
set<T>(documentRef: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): WriteBatch;
407450
update<T>(documentRef: DocumentReference<T>, data: UpdateData<T>): WriteBatch;
408451
update(documentRef: DocumentReference<unknown>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch;
452+
;
409453
}
410454

411455
// @public

0 commit comments

Comments
 (0)