Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enums declared in types are missing implementations #3365

Closed
kraenhansen opened this issue Oct 28, 2020 · 1 comment · Fixed by #5493
Closed

Enums declared in types are missing implementations #3365

kraenhansen opened this issue Oct 28, 2020 · 1 comment · Fixed by #5493
Assignees

Comments

@kraenhansen
Copy link
Member

kraenhansen commented Oct 28, 2020

Goals

Use values from enums in code.

Expected Results

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
@sync-by-unito
Copy link

sync-by-unito bot commented Feb 24, 2023

➤ JacobOscarGunnarsson commented:

Fixed on the bindgen branch

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants