Created
September 16, 2022 22:22
-
-
Save sakymar/11f600065689829e8596055a10de285d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'react-native' | |
declare module 'react-native' { | |
namespace StyleSheet { | |
type Style = ViewStyle | TextStyle | ImageStyle | |
type NamedStyles<T> = { [P in keyof T]: Style } | |
/** | |
* Creates a StyleSheet style reference from the given object. | |
*/ | |
export function create<T, S extends NamedStyles<S> | NamedStyles<any>>( | |
styles: T | NamedStyles<S>, | |
): T & S | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment