File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+
3
+ exports . forEachImpl = function ( snapshot , callback ) {
4
+ return function ( ) {
5
+ return snapshot . forEach ( function ( documentSnapshot ) {
6
+ return callback ( documentSnapshot ) ( )
7
+ } )
8
+ }
9
+ }
Original file line number Diff line number Diff line change 1
1
module Web.Firestore.QuerySnapshot where
2
2
3
+ import Prelude
4
+ import Data.Function.Uncurried (Fn2 , runFn2 )
5
+ import Effect (Effect )
6
+
3
7
foreign import data QuerySnapshot :: Type -> Type
8
+
9
+ foreign import data QueryDocumentSnapshot :: Type -> Type
10
+
11
+ foreign import forEachImpl :: forall a . Fn2 (QuerySnapshot a ) (QueryDocumentSnapshot a -> Effect Unit ) (Effect Unit )
12
+
13
+ forEach :: forall a . QuerySnapshot a -> (QueryDocumentSnapshot a -> Effect Unit ) -> Effect Unit
14
+ forEach = runFn2 forEachImpl
You can’t perform that action at this time.
0 commit comments