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

Types for User#callFunction doesn't match implementation across platforms #3733

Closed
kraenhansen opened this issue May 12, 2021 · 0 comments
Closed
Assignees
Labels

Comments

@kraenhansen
Copy link
Member

kraenhansen commented May 12, 2021

Goals

A strongly typed and unified API across Realm JS and Realm Web.

Expected Results

I would expect calling a MongoDB Realm function would have the same signature across our supported platforms.

Actual Results

The TypeScript declarations and Realm Web implementation takes arguments using "rest parameter" syntax. Whereas the Realm JS implemeation and JS docs takes an array of arguments as its 2nd positional argument.

We might consider deprecating and consider the callFunction method private altogether, since we intent user to call functions in the slightly more convenient syntax:

user.functions.sum(1, 2);

Version of Realm and Tooling

  • Realm JS SDK Version: Realm JS 10.4.0 and Realm Web 1.2.1
  • Node, React Native and Web.
  • Client OS & Version: N/A
  • Which debugger for React Native: None
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants