-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
1 - XS (<= 1 day)
-
SDK FY21-Q3.
-
3365
Goals
Use values from enums in code.
Expected Results
Unable to find source-code formatter for language: typescript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
const Realm = require("realm"); assert(typeof Realm.ConnectionState === "object"); assert(typeof Realm.ConnectionState.Disconnected === "string");
Actual Results
The enums (except UpdateMode) declared by the types are all undefined:
- Realm.SessionStopPolicy
- Realm.OpenRealmBehaviorType
- Realm.OpenRealmTimeOutBehavior
- Realm.ConnectionState
- Realm.NumericLogLevel
Steps to Reproduce & Code Sample
- Open up the Node.js REPL
- Require Realm const Realm = require("realm")
- Try accessing the enum Realm.ConnectionState.Disconnected
- Uncaught TypeError: Cannot read property 'Disconnected' of undefined
Version of Realm and Tooling
- Realm JS SDK Version: ^10.0.1
- Node or React Native: Tested on Node.js (it's most likely also an issue in React Native).
- Client OS & Version: N/A
- Which debugger for React Native: None