Created
July 12, 2020 21:05
-
-
Save fakenickels/2321f7ad950f7a4f418a77ea3703eb03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE | |
'use strict'; | |
var Messaging = require("@react-native-firebase/messaging"); | |
function getToken(param) { | |
return Messaging.default.getToken(); | |
} | |
function onTokenRefresh(cb) { | |
var partial_arg = Messaging.default; | |
return (function (param) { | |
partial_arg.onTokenRefresh(cb); | |
return /* () */0; | |
}); | |
} | |
var Messaging$1 = { | |
getToken: getToken, | |
onTokenRefresh: onTokenRefresh | |
}; | |
exports.Messaging = Messaging$1; | |
/* @react-native-firebase/messaging Not a pure module */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Messaging = { | |
type t; | |
[@bs.module "@react-native-firebase/messaging"] external messaging: t = "default"; | |
[@bs.send] | |
external getToken: (t, unit) => Js.Promise.t(string) = "getToken"; | |
[@bs.send] | |
external onTokenRefresh: (t, string => unit, unit) => unit = | |
"onTokenRefresh"; | |
let getToken = () => messaging->getToken(); | |
let onTokenRefresh = cb => messaging->onTokenRefresh(cb); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment