Skip to content

Instantly share code, notes, and snippets.

@ddgromit
Created May 25, 2017 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddgromit/9c293721fffe60aa5be6a9c84cbd3f8d to your computer and use it in GitHub Desktop.
Save ddgromit/9c293721fffe60aa5be6a9c84cbd3f8d to your computer and use it in GitHub Desktop.
import React from 'react'
import styled from 'styled-components';
class Blah extends React.Component {
render() { return <div />; }
}
styled(Blah);
21: styled(Blah);
^^^^^^^^^^^^ function call
21: styled(Blah);
^^^^ class type: Blah. This type is incompatible with
43: (baseComponent: Component): StyledComponent,
^^^^^^^^^ union: type application of identifier `React$Component` | function type. See lib: flow-typed/npm/styled-components_v1.4.x.js:43
Member 1:
20: | React$Component<*, *, *>
^^^^^^^^^^^^^^^^^^^^^^^^ type application of identifier `React$Component`. See lib: flow-typed/npm/styled-components_v1.4.x.js:20
Error:
21: styled(Blah);
^^^^ class type: Blah. This type is incompatible with
20: | React$Component<*, *, *>
^^^^^^^^^^^^^^^^^^^^^^^^ React$Component. See lib: flow-typed/npm/styled-components_v1.4.x.js:20
Member 2:
21: | (props: *) => React$Element<*>;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: flow-typed/npm/styled-components_v1.4.x.js:21
Error:
21: | (props: *) => React$Element<*>;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in. See lib: flow-typed/npm/styled-components_v1.4.x.js:21
21: styled(Blah);
^^^^ statics of Blah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment