Add explicit types for Types and Properties in LayoutAnimation (#48728)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48728

Changelog:
[General][Changed] - Improved types for exported Types and Properties in LayoutAnimation

Reviewed By: rshest

Differential Revision: D68270119

fbshipit-source-id: 7e9e6e6f20b6c17990b40d423eb4571807004b49
This commit is contained in:
Dawid Małecki
2025-01-20 05:36:41 -08:00
committed by Facebook GitHub Bot
parent 812c3b33cd
commit 3c02738ec4
2 changed files with 4 additions and 4 deletions
@@ -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<mixed>) {
console.error('LayoutAnimation.checkConfig(...) has been disabled.');
},
@@ -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<mixed>): void,
Presets: Presets,
easeInEaseOut: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void,