Skip to content

Commit

Permalink
Add Global.hermesInternal (facebook#613)
Browse files Browse the repository at this point in the history
* Add Global.hermesInternal

Closes facebook#610

* Update Global.md
  • Loading branch information
MoOx authored Sep 23, 2019
1 parent 6abb155 commit 6c6772b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/apis/Global.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ else {
"This is production"
}
```

## `Global.hermesInternal`

This is the `HermesInternal` value known in JavaScript as
[`global.HermesInternal`](https://facebook.github.io/react-native/docs/hermes).

You can use it like this:

```reason
let isHermes = () => Global.hermesInternal != None;
```
3 changes: 3 additions & 0 deletions src/apis/Global.re
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
[@bs.val] external __DEV__: bool = "__DEV__";

[@bs.scope "global"] [@bs.val]
external hermesInternal: option(Js.t('a)) = "hermesInternal";

0 comments on commit 6c6772b

Please sign in to comment.