Closed vincaslt closed 7 years ago
I'm using @types/react-notification-system-redux
and this works without any errors:
import * as Notifications from 'react-notification-system-redux';
export class App extends React.Component<IAppProps, {}> {
render(): JSX.Element {
return (
<Router>
<div className="layout">
<Notifications
notifications={notifications}
/>
</div>
</Router>
);
}
}
Don't remember exactly what the problem was, but I don't seem to have problems with it anymore.
Using these types: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/07352da21a909cb2786a40106aad1fea562d5973/types/react-notification-system-redux/index.d.ts
I see that the element Notifications is exported both as a class and as a namespace. I cannot figure out how to import the component, because the interpreter always tells me it's ambiguous:
import * as Notifications from 'react-notification-system-redux'
<Notifications notifications={notifications} />
<- tells me:[ts] JSX element type 'Notifications' does not have any construct or call signatures.
import Notifications from 'react-notification-system-redux'
<- tells me there is no default exportimport {Notifications} from 'react-notification-system-redux'
<- has no exported member 'Notifications'.