SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

Define precise return types for toJs conversions, instead of generic jsi::Value (#51224)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51224

Changelog: [Internal]

We have a bunch of places where we rely on implicit conversion operators of `jsi::Value` and return some primitive type.

This doesn't work well with Bridging, because currently it doesn't take into account these implicit operator conversions: primitives won't be treated as primitivies, but rather as generic `jsi::Value`, which could be many things.

We should be explicit about return type in `toJs`, because it affects the type checking logic.

Reviewed By: javache

Differential Revision: D74478571

fbshipit-source-id: 0633159c5af3a02aafe14e2b137c133d4554a5f8
R
Ruslan Lesiutin committed
7430ee0b99e887630ab07948fa1e4b7041efa174
Parent: e403b51
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/12/2025, 7:38:58 PM