Skip to content

Commit

Permalink
chore: use consistent default props type for both StyledOptions and F…
Browse files Browse the repository at this point in the history
…ilteringStyledOptions
  • Loading branch information
antongolub committed Mar 8, 2022
1 parent c2c2c27 commit d3092bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/native/types/base.d.ts
Expand Up @@ -69,10 +69,8 @@ export interface FilteringStyledOptions<
shouldForwardProp?(propName: PropertyKey): propName is ForwardedProps
}

export interface StyledOptions<Props = null> {
shouldForwardProp?(
propName: Props extends null ? PropertyKey : keyof Props
): boolean
export interface StyledOptions<Props = Record<PropertyKey, any>> {
shouldForwardProp?(propName: keyof Props): boolean
}

/**
Expand Down
6 changes: 2 additions & 4 deletions packages/styled/types/base.d.ts
Expand Up @@ -30,11 +30,9 @@ export interface FilteringStyledOptions<
target?: string
}

export interface StyledOptions<Props = null> {
export interface StyledOptions<Props = Record<PropertyKey, any>> {
label?: string
shouldForwardProp?(
propName: Props extends null ? PropertyKey : keyof Props
): boolean
shouldForwardProp?(propName: keyof Props): boolean
target?: string
}

Expand Down

0 comments on commit d3092bb

Please sign in to comment.