Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Cast unbox to primitive

$
0
0

Thank you!
I have a related question about this.

type collectionReference<'documentdata, 'metadata>

type query<'documentdata, 'metadata>

In OO terms the collectionReference inherits from query in my bindings.

I worked around this using:

  external collectionReferenceToQuery: collectionReference<'documentdata, 'metadata> => query<
    'documentdata,
    'metadata,
  > = "%identity"

  /// https://firebase.google.com/docs/reference/js/firestore_.md#getdocs_4e56953
  @module("firebase/firestore")
  external getDocs: query<'documentdata, 'metadata> => Js.Promise.t<
    querySnapshot<'documentdata, 'metadata>,
  > = "getDocs"

Is this coercion operator an option somehow in this case as well?


Viewing all articles
Browse latest Browse all 2592

Trending Articles