realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Align How Enums are Defined

Open takameyer opened this issue 3 years ago • 1 comments
trafficstars

What, How & Why?

This addresses a breaking change we want to make where typed "string" unions are replaced with respective enums.

This closes #1955

☑️ ToDos

  • [ ] 📝 Changelog entry
  • [ ] 📝 Compatibility label is updated or copied from previous entry
  • [ ] 🚦 Tests
  • [ ] 🔀 Executed flexible sync tests locally if modifying flexible sync
  • [ ] 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • [ ] 📱 Check the React Native/other sample apps work if necessary
  • [ ] 📝 Public documentation PR created or is not necessary
  • [ ] 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • [ ] typescript definitions file is updated
  • [ ] jsdoc files updated
  • [ ] Chrome debug API is updated if API is available on React Native

takameyer avatar Sep 13 '22 11:09 takameyer

@tomduncalf @cmelchior Please be aware that the changes to Realm.Auth.EmailPasswordAuth are cover by a private Jira ticket.

kneth avatar Sep 14 '22 07:09 kneth

It looks like we forgot the Realm#addListener which takes a string for event name, which should actually take an enum 🤔

https://github.com/realm/realm-js/blob/master/types/index.d.ts#L1265-L1285

kraenhansen avatar Oct 19 '22 10:10 kraenhansen