add missing AppRegistry functions by sgny · Pull Request #567 · rescript-react-native/rescript-react-native

Related to #561, these are almost complete, if not quite. What are still missing:

  • setComponentProviderInstrumentationHook
  • createPerformanceLogger (which is needed to create the hook)

(I still need to figure out how to bind to createPerformanceLogger, perhaps in a later PR?)

Some of the functions take an argument of type Function; that argument is passed appParameters (which is of type any), therefore I decided to define Function to be of type appParameters => unit and added a function asAppParameters to cast any type as appParameters. Hopefully that should be flexible enough. I don't believe the return type of Function matters at all, hence I chose to specify unit instead of some abstract type.