mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Change Animated re-export to generate correct namespace in TS (#50222)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50222 The flow-api-translator will generate ```ts export * as default from './AnimatedExports'; ``` in TS which preserves the namespace. Previous import, export translated to: ```ts declare const $$EXPORT_DEFAULT_DECLARATION$$: typeof Animated; declare type $$EXPORT_DEFAULT_DECLARATION$$ = typeof $$EXPORT_DEFAULT_DECLARATION$$; export default $$EXPORT_DEFAULT_DECLARATION$$; ``` which dropped the `Animated` namespace. Changelog: [Internal] Reviewed By: huntie Differential Revision: D71737199 fbshipit-source-id: a46a7ddddd023fa831cd4bb50f17a0641f328066
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9c5cf4e9c4
commit
3bb86b0ecf
@@ -9,7 +9,5 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import * as Animated from './AnimatedExports';
|
||||
|
||||
export * as default from './AnimatedExports';
|
||||
export type {CompositeAnimation, Numeric} from './AnimatedImplementation';
|
||||
export default Animated;
|
||||
|
||||
@@ -118,8 +118,8 @@ declare export default typeof Animated;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Animated/Animated.js.flow 1`] = `
|
||||
"export type { CompositeAnimation, Numeric } from \\"./AnimatedImplementation\\";
|
||||
declare export default typeof Animated;
|
||||
"export * as default from \\"./AnimatedExports\\";
|
||||
export type { CompositeAnimation, Numeric } from \\"./AnimatedImplementation\\";
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user