Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-887

Enums declared in types are missing implementations

      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

      1. Open up the Node.js REPL
      2. Require Realm const Realm = require("realm")
      3. Try accessing the enum Realm.ConnectionState.Disconnected
      4. 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

            Assignee:
            jacob.gunnarsson@mongodb.com Jacob Gunnarsson (Inactive)
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: