Skip to content

2.6.17

Choose a tag to compare

@tylim88 tylim88 released this 02 Oct 10:08
· 78 commits to main since this release
  1. allow updateDocNoFlatten to receive empty object as argument on nested level
updateDocNoFlatten(docRef, { } ) // this will still throw type error and runtime error. With runtime error there is one exception: transaction update(web only), this inconsistency come from firebase Web SDK. 
updateDocNoFlatten(docRef, { a: { } } )  // this will no longer throw type error. It will delete all members of object 'a' (default behavior of firestore update operation)
  1. previously by design the library sacrificed autocomplete for smarter type checking in update operations. Now autocomplete is possible in all update operations without sacrificing smarter type checking

image

  1. fixed:

The type of dynamic object key is not working properly if the type is mapped type, e.g. updateDoc(ref, { a:{ [b]:1 } }) where the type is { a:Record<string,number> }.

{ a:{ [b]: 1 } } now work fine

  1. transaction and batch operation refs no longer return undefined (trivial)