UPDATE: New implementation, typed, faster, even simpler, is coming.
Check the este.firebaseapp.com/fields example. Check the source code.