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

Device-Sync clientRest mode typescript error

      How frequently does the bug occur?

      Always

      Description

      When setting the clientRest mode on react native with typescript. Typescript will report that the value is not assignable to type ClientResetMode.

      The code still works, but it is a bug that should be fixed with the typing issue.

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      Always

      Reproduction Steps

      Add the following code in the app.

      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
      <RealmProvider
        schema={[FriendRequest]}
        sync={{
          flexible: true,
          clientReset:{
            mode: 'manual', // <-- Here the type error show up
            onManual: (session, path) => {
              // handle manual client reset here
            },
          },
          onError: (session, error) => {
            logger.error(`Realm sync error: ${error}`);
          }
        }}
      
      >
        // Rest of the code
      </RealmProvider>
      

      Version

      "realm": "^12.3.1",, "@realm/react": "^0.6.2",

      What services are you using?

      Atlas Device Sync

      Are you using encryption?

      No

      Platform OS and version(s)

      Win11 23H2

      Build environment

      No response

      Cocoapods version

      No response

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: