@firebase/firestore 3.0.2-canary.3846fb049 → 3.0.2-canary.4e7aba48a

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.
Files changed (52) hide show
  1. package/dist/firestore/compat/api/database.d.ts +0 -9
  2. package/dist/firestore/compat/index.console.d.ts +10 -1
  3. package/dist/firestore/lite/index.d.ts +1 -1
  4. package/dist/firestore/src/api.d.ts +1 -1
  5. package/dist/firestore/src/lite-api/reference.d.ts +1 -1
  6. package/dist/firestore/src/lite-api/types.d.ts +12 -1
  7. package/dist/index.d.ts +13 -2
  8. package/dist/index.esm2017.js +2583 -2583
  9. package/dist/index.esm2017.js.map +1 -1
  10. package/dist/index.esm5.js +2516 -2516
  11. package/dist/index.esm5.js.map +1 -1
  12. package/dist/index.node.cjs.esm2017.js +4 -4
  13. package/dist/index.node.cjs.esm2017.js.map +1 -1
  14. package/dist/index.node.cjs.js +3 -3
  15. package/dist/index.node.cjs.js.map +1 -1
  16. package/dist/index.rn.js +2799 -2799
  17. package/dist/index.rn.js.map +1 -1
  18. package/dist/internal.d.ts +14 -2
  19. package/dist/lite/firestore/compat/api/database.d.ts +0 -9
  20. package/dist/lite/firestore/compat/index.console.d.ts +10 -1
  21. package/dist/lite/firestore/lite/index.d.ts +1 -1
  22. package/dist/lite/firestore/src/api.d.ts +1 -1
  23. package/dist/lite/firestore/src/lite-api/reference.d.ts +1 -1
  24. package/dist/lite/firestore/src/lite-api/types.d.ts +12 -1
  25. package/dist/lite/index.browser.esm2017.js +2 -2
  26. package/dist/lite/index.browser.esm2017.js.map +1 -1
  27. package/dist/lite/index.browser.esm5.js +2 -2
  28. package/dist/lite/index.browser.esm5.js.map +1 -1
  29. package/dist/lite/index.d.ts +13 -2
  30. package/dist/lite/index.node.cjs.js +2 -2
  31. package/dist/lite/index.node.cjs.js.map +1 -1
  32. package/dist/lite/index.node.esm2017.js +2 -2
  33. package/dist/lite/index.node.esm2017.js.map +1 -1
  34. package/dist/lite/index.rn.esm2017.js +2 -2
  35. package/dist/lite/index.rn.esm2017.js.map +1 -1
  36. package/dist/lite/internal.d.ts +14 -2
  37. package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -9
  38. package/dist/lite/packages/firestore/compat/index.console.d.ts +10 -1
  39. package/dist/lite/packages/firestore/lite/index.d.ts +1 -1
  40. package/dist/lite/packages/firestore/src/api.d.ts +1 -1
  41. package/dist/lite/packages/firestore/src/lite-api/reference.d.ts +1 -1
  42. package/dist/lite/packages/firestore/src/lite-api/types.d.ts +12 -1
  43. package/dist/lite/private.d.ts +14 -2
  44. package/dist/packages/firestore/compat/api/database.d.ts +0 -9
  45. package/dist/packages/firestore/compat/index.console.d.ts +10 -1
  46. package/dist/packages/firestore/dist/index.esm2017.d.ts +156 -156
  47. package/dist/packages/firestore/lite/index.d.ts +1 -1
  48. package/dist/packages/firestore/src/api.d.ts +1 -1
  49. package/dist/packages/firestore/src/lite-api/reference.d.ts +1 -1
  50. package/dist/packages/firestore/src/lite-api/types.d.ts +12 -1
  51. package/dist/private.d.ts +14 -2
  52. package/package.json +9 -9
@@ -103,6 +103,17 @@ export declare class Bytes {
103
103
  isEqual(other: Bytes): boolean;
104
104
  }
105
105
  /* Excluded from this release type: ByteString */
106
+ /**
107
+ * Helper for calculating the nested fields for a given type T1. This is needed
108
+ * to distribute union types such as `undefined | {...}` (happens for optional
109
+ * props) or `{a: A} | {b: B}`.
110
+ *
111
+ * In this use case, `V` is used to distribute the union types of `T[K]` on
112
+ * `Record`, since `T[K]` is evaluated as an expression and not distributed.
113
+ *
114
+ * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
115
+ */
116
+ export declare type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never;
106
117
  /**
107
118
  * Gets a `CollectionReference` instance that refers to the collection at
108
119
  * the specified absolute path.
@@ -757,7 +768,7 @@ export { LogLevel };
757
768
  * all possible keys that are all marked as optional
758
769
  */
759
770
  export declare type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{
760
- [K in keyof T & string]: T[K] extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<T[K]>> : never;
771
+ [K in keyof T & string]: ChildUpdateFields<K, T[K]>;
761
772
  }[keyof T & string]>;
762
773
  /**
763
774
  * Creates a {@link QueryConstraint} that sorts the query result by the
@@ -1297,7 +1308,7 @@ export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void
1297
1308
  * reference nested fields within the document. FieldValues can be passed in
1298
1309
  * as property values.
1299
1310
  */
1300
- export declare type UpdateData<T> = T extends Primitive ? T : T extends Map<infer K, infer V> ? Map<UpdateData<K>, UpdateData<V>> : T extends {} ? {
1311
+ export declare type UpdateData<T> = T extends Primitive ? T : T extends {} ? {
1301
1312
  [K in keyof T]?: UpdateData<T[K]> | FieldValue;
1302
1313
  } & NestedUpdateFields<T> : Partial<T>;
1303
1314
  /**
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
15
15
 
16
16
  var nodeFetch__default = /*#__PURE__*/_interopDefaultLegacy(nodeFetch);
17
17
 
18
- var version$1 = "3.0.2-canary.3846fb049";
18
+ var version$1 = "3.0.2-canary.4e7aba48a";
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
@@ -67,7 +67,7 @@ User.UNAUTHENTICATED = new User(null);
67
67
  User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
68
68
  User.FIRST_PARTY = new User('first-party-uid');
69
69
  User.MOCK_USER = new User('mock-user');
70
- var version = "9.0.2-canary.3846fb049";
70
+ var version = "9.0.2-canary.4e7aba48a";
71
71
  /**
72
72
  * @license
73
73
  * Copyright 2017 Google LLC