66 lines
2.6 KiB
Diff
66 lines
2.6 KiB
Diff
diff --git a/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts b/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
|
|
index 67c921b..cbb6f83 100644
|
|
--- a/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
|
|
+++ b/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
|
|
@@ -9,7 +9,11 @@ interface Handlers<T, TContext extends Context> {
|
|
[key: string]: Handler<T, TContext> | undefined;
|
|
}
|
|
type useEventType = <T extends object>(handler: (e: T) => void, eventNames?: string[], rebuild?: boolean) => (e: NativeSyntheticEvent<T>) => void;
|
|
-export declare const useEvent: useEventType;
|
|
+export declare function useEvent<T, K>(
|
|
+ handler: T,
|
|
+ events: string[],
|
|
+ rebuild: boolean,
|
|
+): K;
|
|
type useHandlerType = <T, TContext extends Context = Record<string, never>>(handlers: Handlers<T, TContext>, deps?: DependencyList) => {
|
|
context: TContext;
|
|
doDependenciesDiffer: boolean;
|
|
diff --git a/node_modules/react-native-reanimated/src/reanimated2/mutables.ts b/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
|
|
index 6c4213d..e3cc49c 100644
|
|
--- a/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
|
|
+++ b/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
|
|
@@ -94,25 +94,25 @@ export function makeMutable<T>(
|
|
}
|
|
return value;
|
|
},
|
|
- set _value(newValue: T) {
|
|
- if (NativeReanimatedModule.native) {
|
|
- throw new Error(
|
|
- 'Setting `_value` directly is only possible on the UI runtime'
|
|
- );
|
|
- }
|
|
- value = newValue;
|
|
- listeners!.forEach((listener) => {
|
|
- listener(newValue);
|
|
- });
|
|
- },
|
|
- get _value(): T {
|
|
- if (NativeReanimatedModule.native) {
|
|
- throw new Error(
|
|
- 'Reading from `_value` directly is only possible on the UI runtime'
|
|
- );
|
|
- }
|
|
- return value;
|
|
- },
|
|
+ // set _value(newValue: T) {
|
|
+ // if (NativeReanimatedModule.native) {
|
|
+ // throw new Error(
|
|
+ // 'Setting `_value` directly is only possible on the UI runtime'
|
|
+ // );
|
|
+ // }
|
|
+ // value = newValue;
|
|
+ // listeners!.forEach((listener) => {
|
|
+ // listener(newValue);
|
|
+ // });
|
|
+ // },
|
|
+ // get _value(): T {
|
|
+ // if (NativeReanimatedModule.native) {
|
|
+ // throw new Error(
|
|
+ // 'Reading from `_value` directly is only possible on the UI runtime'
|
|
+ // );
|
|
+ // }
|
|
+ // return value;
|
|
+ // },
|
|
modify: (modifier: (value: T) => T) => {
|
|
runOnUI(() => {
|
|
mutable.value = modifier(mutable.value);
|