diff --git a/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js b/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js index a14283e1e7e..cc00b37e2ce 100644 --- a/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js +++ b/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js @@ -174,13 +174,13 @@ const LayoutAnimation = { easeIn: 'easeIn', easeOut: 'easeOut', keyboard: 'keyboard', - }), + }) as $ReadOnly<{[K in LayoutAnimationType]: K}>, Properties: Object.freeze({ opacity: 'opacity', scaleX: 'scaleX', scaleY: 'scaleY', scaleXY: 'scaleXY', - }), + }) as $ReadOnly<{[K in LayoutAnimationProperty]: K}>, checkConfig(...args: Array) { console.error('LayoutAnimation.checkConfig(...) has been disabled.'); }, diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index a7e2a4da654..ff5b2b5853c 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -5635,8 +5635,8 @@ declare const Presets: { declare const LayoutAnimation: { configureNext: configureNext, create: create, - Types: $FlowFixMe, - Properties: $FlowFixMe, + Types: $ReadOnly<{ [K in LayoutAnimationType]: K }>, + Properties: $ReadOnly<{ [K in LayoutAnimationProperty]: K }>, checkConfig(...args: Array): void, Presets: Presets, easeInEaseOut: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void,