-
Notifications
You must be signed in to change notification settings - Fork 734
Fix various typing issues #1291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React, {PureComponent} from 'react'; | ||
import {Text as RNText, StyleSheet, TextProps as RNTextProps, TextStyle, Animated} from 'react-native'; | ||
import {Text as RNText, StyleSheet, TextProps as RNTextProps, TextStyle, Animated, StyleProp} from 'react-native'; | ||
import _ from 'lodash'; | ||
import { | ||
asBaseComponent, | ||
|
@@ -12,7 +12,7 @@ import { | |
} from '../../commons/new'; | ||
import {Colors} from 'style'; | ||
|
||
export type TextProps = RNTextProps & TypographyModifiers & ColorsModifiers & MarginModifiers & { | ||
export type TextProps = Omit<RNTextProps, 'style'> & TypographyModifiers & ColorsModifiers & MarginModifiers & { | ||
/** | ||
* color of the text | ||
*/ | ||
|
@@ -38,6 +38,7 @@ export type TextProps = RNTextProps & TypographyModifiers & ColorsModifiers & Ma | |
*/ | ||
animated?: boolean; | ||
textAlign?: string; | ||
style?: StyleProp<TextStyle | Animated.AnimatedProps<TextStyle>>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, weirdly it didn't throw an error on that, anyway fixed it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should move more screens to tsx (found it there) |
||
} | ||
export type TextPropTypes = TextProps; //TODO: remove after ComponentPropTypes deprecation; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This:
imageProps?: Omit<ImageProps, 'source' | 'style'>;
feels a bit more accurate, WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, technically you can also pass source in imageProps and it will work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but I'm not sure it's intentional, approving