mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-11 22:57:35 +03:00
Adds RCTActivityIndicatorView literal reference (#2588)
Summary: Release notes: none When testing our internal React Native bundle, we need to supply a string reference to `RCTActivityIndicatorView` for JSX elements. Pull Request resolved: https://github.com/facebook/prepack/pull/2588 Differential Revision: D10193281 Pulled By: trueadm fbshipit-source-id: ce7785d9c71ea4c278118e08c1438dbb5259f8b8
This commit is contained in:
parent
473470a9a5
commit
1f5664ff15
13
src/intrinsics/fb-www/react-native-mocks.js
vendored
13
src/intrinsics/fb-www/react-native-mocks.js
vendored
@ -1678,6 +1678,19 @@ export function createMockReactNative(realm: Realm, reactNativeRequireName: stri
|
|||||||
invariant(RCTTextDerivedReference instanceof AbstractValue);
|
invariant(RCTTextDerivedReference instanceof AbstractValue);
|
||||||
realm.react.reactElementStringTypeReferences.set("RCTText", RCTTextDerivedReference);
|
realm.react.reactElementStringTypeReferences.set("RCTText", RCTTextDerivedReference);
|
||||||
|
|
||||||
|
let RCTActivityIndicatorViewDerivedReference = AbstractValue.createTemporalFromBuildFunction(
|
||||||
|
realm,
|
||||||
|
StringValue,
|
||||||
|
[new StringValue(realm, "RCTActivityIndicatorView")],
|
||||||
|
createOperationDescriptor("REACT_NATIVE_STRING_LITERAL"),
|
||||||
|
{ skipInvariant: true, isPure: true }
|
||||||
|
);
|
||||||
|
invariant(RCTActivityIndicatorViewDerivedReference instanceof AbstractValue);
|
||||||
|
realm.react.reactElementStringTypeReferences.set(
|
||||||
|
"RCTActivityIndicatorView",
|
||||||
|
RCTActivityIndicatorViewDerivedReference
|
||||||
|
);
|
||||||
|
|
||||||
let reactLibrary = realm.fbLibraries.react;
|
let reactLibrary = realm.fbLibraries.react;
|
||||||
invariant(
|
invariant(
|
||||||
reactLibrary !== undefined,
|
reactLibrary !== undefined,
|
||||||
|
Loading…
Reference in New Issue
Block a user