Skip to content

Commit 0f0dc4b

Browse files
authored
chore(Worklets): stabilize Serializable enum (#9025)
## Summary In #8996 `SerializableType` enum will have to be locked. For that reason we should already add the `SymbolType` to the enum to not break ABI in the future if we want to implement it. ## Test plan 🚀
1 parent cb797b8 commit 0f0dc4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-native-worklets/Common/cpp/worklets/SharedItems/Serializable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ std::shared_ptr<Serializable> extractSerializableOrThrow(
8787
auto nativeState = object.getNativeState(rt);
8888
return std::dynamic_pointer_cast<SerializableJSRef>(nativeState)->value();
8989
}
90-
throw std::runtime_error("[Worklets] Attempted to extract from a Object that wasn't converted to a Serializable.");
90+
throw std::runtime_error("[Worklets] Attempted to extract from an Object that wasn't converted to a Serializable.");
9191
} else if (maybeSerializableValue.isUndefined()) {
9292
return Serializable::undefined();
9393
}

packages/react-native-worklets/Common/cpp/worklets/SharedItems/Serializable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class Serializable {
5050
NullType,
5151
BooleanType,
5252
NumberType,
53-
// SymbolType, TODO
5453
BigIntType,
5554
StringType,
5655
ObjectType,
@@ -67,6 +66,7 @@ class Serializable {
6766
ImportType,
6867
SynchronizableType,
6968
CustomType,
69+
SymbolType, /* unused */
7070
};
7171

7272
explicit Serializable(ValueType valueType) : valueType_(valueType) {}

0 commit comments

Comments
 (0)