1 | 'use strict';
|
2 | import { addWhitelistedNativeProps } from '../ConfigHelper';
|
3 | import type {
|
4 | AnimatedPropsAdapterFunction,
|
5 | AnimatedPropsAdapterWorklet,
|
6 | } from './commonTypes';
|
7 |
|
8 |
|
9 | export function createAnimatedPropAdapter(
|
10 | adapter: AnimatedPropsAdapterFunction,
|
11 | nativeProps?: string[]
|
12 | ): AnimatedPropsAdapterFunction;
|
13 |
|
14 | export function createAnimatedPropAdapter(
|
15 | adapter: AnimatedPropsAdapterWorklet,
|
16 | nativeProps?: string[]
|
17 | ): AnimatedPropsAdapterWorklet {
|
18 | const nativePropsToAdd: { [key: string]: boolean } = {};
|
19 | nativeProps?.forEach((prop) => {
|
20 | nativePropsToAdd[prop] = true;
|
21 | });
|
22 | addWhitelistedNativeProps(nativePropsToAdd);
|
23 | return adapter;
|
24 | }
|