You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Missing type annotation for StyleProps. StyleProps is a type parameter declared in function type [1] and was implicitly
instantiated at encaps tag [2].
src/App.js
7│ border: 1px solid blue;
8│ `;
9│
[2] 10│ const Red = styled.div`
11│ border: 1px solid red;
12│ `;
13│
14│ export { Red, Blue };
15│
flow-typed/npm/styled-components_v5.x.x.js
[1] 255│ [[call]]: <StyleProps, Theme>(
256│ string[],
257│ ...Interpolation<PropsWithTheme<StyleProps, Theme>>[]
258│ ) => StyledComponent<StyleProps, Theme, V>,
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Red should auto resolve to type StyledComponent<empty, empty, HTMLDivElement> (or less ideal StyledComponent<empty, empty, any>)
If this is a feature request, what is motivation or use case for changing the behavior?
Auto infer types will reduce a lot of refactoring (type insertion) needed when introducing flow in to existing code.
Related, any projects using styled-components/macro are going to start seeing a lot of issues via #3762 so it would be good to auto resolve as many of them as possible.
The text was updated successfully, but these errors were encountered:
penx
added a commit
to penx/flow-typed
that referenced
this issue
Mar 6, 2020
The current flow-typed def requires an insane amount of manual typing that just doesnt
make any sense. Restoring the old definition for now:
flow-typed/flow-typed#3766
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Red should auto resolve to type
StyledComponent<empty, empty, HTMLDivElement>
(or less idealStyledComponent<empty, empty, any>
)If this is a feature request, what is motivation or use case for changing the behavior?
Auto infer types will reduce a lot of refactoring (type insertion) needed when introducing flow in to existing code.
Related, any projects using
styled-components/macro
are going to start seeing a lot of issues via #3762 so it would be good to auto resolve as many of them as possible.The text was updated successfully, but these errors were encountered: