@@ -91,7 +91,7 @@ const nativeOps: ?typeof NativeAnimatedModule = useSingleOpBatching
9191 * Wrappers around NativeAnimatedModule to provide flow and autocomplete support for
9292 * the native module methods, and automatic queue management on Android
9393 */
94- const API = {
94+ export const API = {
9595 getValue : function (
9696 tag : number ,
9797 saveValueCallback : ( value : number ) => void ,
@@ -419,35 +419,35 @@ const SUPPORTED_INTERPOLATION_PARAMS = {
419419 extrapolateLeft : true ,
420420} ;
421421
422- function addWhitelistedStyleProp ( prop : string ) : void {
422+ export function addWhitelistedStyleProp ( prop : string ) : void {
423423 SUPPORTED_STYLES [ prop ] = true ;
424424}
425425
426- function addWhitelistedTransformProp ( prop : string ) : void {
426+ export function addWhitelistedTransformProp ( prop : string ) : void {
427427 SUPPORTED_TRANSFORMS [ prop ] = true ;
428428}
429429
430- function addWhitelistedInterpolationParam ( param : string ) : void {
430+ export function addWhitelistedInterpolationParam ( param : string ) : void {
431431 SUPPORTED_INTERPOLATION_PARAMS [ param ] = true ;
432432}
433433
434- function isSupportedColorStyleProp ( prop : string ) : boolean {
434+ export function isSupportedColorStyleProp ( prop : string ) : boolean {
435435 return SUPPORTED_COLOR_STYLES . hasOwnProperty ( prop ) ;
436436}
437437
438- function isSupportedStyleProp ( prop : string ) : boolean {
438+ export function isSupportedStyleProp ( prop : string ) : boolean {
439439 return SUPPORTED_STYLES . hasOwnProperty ( prop ) ;
440440}
441441
442- function isSupportedTransformProp ( prop : string ) : boolean {
442+ export function isSupportedTransformProp ( prop : string ) : boolean {
443443 return SUPPORTED_TRANSFORMS . hasOwnProperty ( prop ) ;
444444}
445445
446- function isSupportedInterpolationParam ( param : string ) : boolean {
446+ export function isSupportedInterpolationParam ( param : string ) : boolean {
447447 return SUPPORTED_INTERPOLATION_PARAMS . hasOwnProperty ( param ) ;
448448}
449449
450- function validateTransform (
450+ export function validateTransform (
451451 configs : Array <
452452 | {
453453 type : 'animated' ,
@@ -472,7 +472,7 @@ function validateTransform(
472472 } ) ;
473473}
474474
475- function validateStyles ( styles : { [ key : string ] : ?number , ...} ) : void {
475+ export function validateStyles ( styles : { [ key : string ] : ?number , ...} ) : void {
476476 for ( const key in styles ) {
477477 if ( ! isSupportedStyleProp ( key ) ) {
478478 throw new Error (
@@ -482,7 +482,7 @@ function validateStyles(styles: {[key: string]: ?number, ...}): void {
482482 }
483483}
484484
485- function validateInterpolation < OutputT : number | string > (
485+ export function validateInterpolation < OutputT : number | string > (
486486 config : InterpolationConfigType < OutputT > ,
487487) : void {
488488 for ( const key in config ) {
@@ -494,21 +494,21 @@ function validateInterpolation<OutputT: number | string>(
494494 }
495495}
496496
497- function generateNewNodeTag ( ) : number {
497+ export function generateNewNodeTag ( ) : number {
498498 return __nativeAnimatedNodeTagCount ++ ;
499499}
500500
501- function generateNewAnimationId ( ) : number {
501+ export function generateNewAnimationId ( ) : number {
502502 return __nativeAnimationIdCount ++ ;
503503}
504504
505- function assertNativeAnimatedModule ( ) : void {
505+ export function assertNativeAnimatedModule ( ) : void {
506506 invariant ( NativeAnimatedModule , 'Native animated module is not available' ) ;
507507}
508508
509509let _warnedMissingNativeAnimated = false ;
510510
511- function shouldUseNativeDriver (
511+ export function shouldUseNativeDriver (
512512 config : $ReadOnly < { ...AnimationConfig , ...} > | EventConfig ,
513513) : boolean {
514514 if ( config . useNativeDriver = = null ) {
@@ -535,7 +535,7 @@ function shouldUseNativeDriver(
535535 return config . useNativeDriver || false ;
536536}
537537
538- function transformDataType ( value : number | string ) : number | string {
538+ export function transformDataType ( value : number | string ) : number | string {
539539 // Change the string type to number type so we can reuse the same logic in
540540 // iOS and Android platform
541541 if ( typeof value !== 'string ') {
@@ -550,7 +550,7 @@ function transformDataType(value: number | string): number | string {
550550 }
551551}
552552
553- module . exports = {
553+ export default {
554554 API ,
555555 isSupportedColorStyleProp ,
556556 isSupportedStyleProp ,
0 commit comments