react-native-worklets
Version:
The React Native multithreading library
16 lines (13 loc) • 322 B
text/typescript
;
import type { Synchronizable } from './types';
export function isSynchronizable<TValue>(
value: unknown
): value is Synchronizable<TValue> {
'worklet';
return (
typeof value === 'object' &&
value !== null &&
'__synchronizableRef' in value &&
value.__synchronizableRef === true
);
}