Skip to content

Upgrade to typescript v4 #1324

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

Merged
merged 4 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
rules: {
/* Disabled rules for typescript */
'no-dupe-class-members': 'off',
'no-undef': 'off',
/* Other Rules */
'no-unused-expressions': 'off',
'arrow-parens': 'off',
Expand Down Expand Up @@ -37,8 +38,11 @@ module.exports = {
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/indent': 0
'@typescript-eslint/indent': 0,
'@typescript-eslint/explicit-module-boundary-types': 0
}
};
4 changes: 2 additions & 2 deletions generatedTypes/commons/modifiers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export declare function extractModifierProps(props: Dictionary<any>): _.Dictiona
* TODO:
* @deprecated switch to Modifiers#extractComponentProps
*/
export declare function extractOwnProps(props: Dictionary<any>, ignoreProps: string[]): Pick<Partial<Dictionary<any>>, number>;
export declare function extractComponentProps(component: any, props: Dictionary<any>, ignoreProps?: string[]): Pick<Partial<Dictionary<any>>, number>;
export declare function extractOwnProps(props: Dictionary<any>, ignoreProps: string[]): _.Omit<Partial<Dictionary<any>>, string>;
export declare function extractComponentProps(component: any, props: Dictionary<any>, ignoreProps?: string[]): _.Omit<Partial<Dictionary<any>>, string>;
export declare function getThemeProps(props?: any, context?: any): any;
export declare function generateModifiersStyle(options: {
color: boolean;
Expand Down
2 changes: 1 addition & 1 deletion generatedTypes/components/avatar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ declare const _default: React.ComponentClass<Pick<AccessibilityProps, "accessibi
/**
* The image source (external or assets)
*/
source?: number | import("react-native").ImageURISource | import("react-native").ImageURISource[] | undefined;
source?: ImageSourcePropType | undefined;
/**
* Image props object
*/
Expand Down
56 changes: 28 additions & 28 deletions generatedTypes/components/badge/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ declare function createStyles(props: BadgeProps): {
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | undefined;
textDecorationColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
textShadowColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
textDecorationColor?: import("react-native").ColorValue | undefined;
textShadowColor?: import("react-native").ColorValue | undefined;
textShadowOffset?: {
width: number;
height: number;
Expand All @@ -140,22 +140,22 @@ declare function createStyles(props: BadgeProps): {
fontVariant?: import("react-native").FontVariant[] | undefined;
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
backfaceVisibility?: "visible" | "hidden" | undefined;
borderBottomColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderBottomColor?: import("react-native").ColorValue | undefined;
borderBottomEndRadius?: number | undefined;
borderBottomLeftRadius?: number | undefined;
borderBottomRightRadius?: number | undefined;
borderBottomStartRadius?: number | undefined;
borderBottomWidth?: number | undefined;
borderColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderEndColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderLeftColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderColor?: import("react-native").ColorValue | undefined;
borderEndColor?: import("react-native").ColorValue | undefined;
borderLeftColor?: import("react-native").ColorValue | undefined;
borderLeftWidth?: number | undefined;
borderRadius?: number | undefined;
borderRightColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderRightColor?: import("react-native").ColorValue | undefined;
borderRightWidth?: number | undefined;
borderStartColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderStartColor?: import("react-native").ColorValue | undefined;
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
borderTopColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderTopColor?: import("react-native").ColorValue | undefined;
borderTopEndRadius?: number | undefined;
borderTopLeftRadius?: number | undefined;
borderTopRightRadius?: number | undefined;
Expand All @@ -165,8 +165,8 @@ declare function createStyles(props: BadgeProps): {
opacity?: number | undefined;
elevation?: number | undefined;
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
alignSelf?: "auto" | "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
alignItems?: import("react-native").FlexAlignType | undefined;
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
aspectRatio?: number | undefined;
borderEndWidth?: string | number | undefined;
borderStartWidth?: string | number | undefined;
Expand Down Expand Up @@ -212,7 +212,7 @@ declare function createStyles(props: BadgeProps): {
width?: string | number | undefined;
zIndex?: number | undefined;
direction?: "ltr" | "rtl" | "inherit" | undefined;
shadowColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
shadowColor?: import("react-native").ColorValue | undefined;
shadowOffset?: {
width: number;
height: number;
Expand All @@ -231,7 +231,7 @@ declare function createStyles(props: BadgeProps): {
};
labelSmall: {
lineHeight: undefined;
color?: string | typeof import("react-native").OpaqueColorValue | undefined;
color?: import("react-native").ColorValue | undefined;
fontFamily?: string | undefined;
fontSize?: number | undefined;
fontStyle?: "normal" | "italic" | undefined;
Expand All @@ -240,8 +240,8 @@ declare function createStyles(props: BadgeProps): {
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | undefined;
textDecorationColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
textShadowColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
textDecorationColor?: import("react-native").ColorValue | undefined;
textShadowColor?: import("react-native").ColorValue | undefined;
textShadowOffset?: {
width: number;
height: number;
Expand All @@ -252,23 +252,23 @@ declare function createStyles(props: BadgeProps): {
fontVariant?: import("react-native").FontVariant[] | undefined;
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
backfaceVisibility?: "visible" | "hidden" | undefined;
backgroundColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderBottomColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
backgroundColor?: import("react-native").ColorValue | undefined;
borderBottomColor?: import("react-native").ColorValue | undefined;
borderBottomEndRadius?: number | undefined;
borderBottomLeftRadius?: number | undefined;
borderBottomRightRadius?: number | undefined;
borderBottomStartRadius?: number | undefined;
borderBottomWidth?: number | undefined;
borderColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderEndColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderLeftColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderColor?: import("react-native").ColorValue | undefined;
borderEndColor?: import("react-native").ColorValue | undefined;
borderLeftColor?: import("react-native").ColorValue | undefined;
borderLeftWidth?: number | undefined;
borderRadius?: number | undefined;
borderRightColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderRightColor?: import("react-native").ColorValue | undefined;
borderRightWidth?: number | undefined;
borderStartColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderStartColor?: import("react-native").ColorValue | undefined;
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
borderTopColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderTopColor?: import("react-native").ColorValue | undefined;
borderTopEndRadius?: number | undefined;
borderTopLeftRadius?: number | undefined;
borderTopRightRadius?: number | undefined;
Expand All @@ -278,8 +278,8 @@ declare function createStyles(props: BadgeProps): {
opacity?: number | undefined;
elevation?: number | undefined;
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
alignSelf?: "auto" | "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
alignItems?: import("react-native").FlexAlignType | undefined;
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
aspectRatio?: number | undefined;
borderEndWidth?: string | number | undefined;
borderStartWidth?: string | number | undefined;
Expand Down Expand Up @@ -325,7 +325,7 @@ declare function createStyles(props: BadgeProps): {
width?: string | number | undefined;
zIndex?: number | undefined;
direction?: "ltr" | "rtl" | "inherit" | undefined;
shadowColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
shadowColor?: import("react-native").ColorValue | undefined;
shadowOffset?: {
width: number;
height: number;
Expand Down Expand Up @@ -377,7 +377,7 @@ declare const _default: React.ComponentClass<ViewProps & TouchableOpacityProps &
/**
* color of border around the badge
*/
borderColor?: string | typeof import("react-native").OpaqueColorValue | undefined;
borderColor?: import("react-native").ColorValue | undefined;
/**
* Additional styles for the top container
*/
Expand All @@ -396,7 +396,7 @@ declare const _default: React.ComponentClass<ViewProps & TouchableOpacityProps &
/**
* Renders an icon badge
*/
icon?: number | import("react-native").ImageURISource | import("react-native").ImageURISource[] | undefined;
icon?: ImageSourcePropType | undefined;
/**
* Additional styling to badge icon
*/
Expand Down
Loading