Issue 1:
When creating declaration files ("declaration": true in tsconfig.json) for a component which uses withStyles the typescript compiler complains with :

TS4023:Exported variable 'MyComponent' has or is using name 'StyledComponentProps' from external module "./node_modules/material-ui/index" but cannot be named.

See microsoft/TypeScript#9944 for more context on the issue

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behaviour

Type inference to handle the issue.

Current Behavior

The compiler issues and error. A work around is to import StyledComponentProps

Steps to Reproduce (for bugs)

import * as React from 'react';
import {withStyles} from 'material-ui/styles';

const decorator = withStyles(({ spacing }) => ({
root: {
padding: spacing.unit * 2
}
}));

const Example = decorator<{}>(({classes}) => (
<div></div>
));

export default Example;

and set "declaration": true in tsconfig.json

To work around add import {StyledComponentProps} from 'material-ui'; to the top of the file

Context

I am creating a node package of shared MUI components for internal use and exporting them (hence using declaration files)

Your Environment

Tech
Version

Material-UI
1.0.0.beta-17

Typescript
2.4.2

Issue 2:
I have inherited this React/typescript/material-ui project from a more experienced developer.

My problem started when I was trying to solve another problem - importing DropDownMenu from material-ui, with my inline linter telling me that it could not be found.

I then changed the version of material-ui": "^1.0.0-beta.6" to beta.10 in package.json. I also did an npm install of @types/material-ui and this seemed to resolve the error in the editor.

But when I reloaded the project with npm start, I got a message in the terminal saying that the project would not compile due to:

These modules were not found:

* material-ui/styles/theme in ./lib/styles/context.js
* material-ui/styles/mixins in ./config/theme.js
* material-ui/styles/palette in ./config/theme.js
* material-ui/styles/breakpoints in ./config/theme.js
* material-ui/styles/typography in ./config/theme.js

I have subsequently uninstalled and reinstalled material-ui several times, experimenting with the latest stable release and the pre-release beta versions. Nothing seems to work.

I have settled on these relevant node modules in the package.json:

"@material/theme": "^0.3.0",
"@types/material-ui": "^0.18.0",
"material": "^0.2.0",
"material-ui": "^1.0.0-beta.10",
"material-ui-icons": "^1.0.0-beta.10",

Your help would be much appreciated as I have read many github issue threads for material-ui stack overflow questions and nothing seems to help. I have also tried to roll back to previous commits and still getting the same error. This is obviously a pretty major problem if I cannot run and compile the project, thanks!

[ x] I have searched the issues of this repository and believe that this is not a duplicate.

Will provide a live reproducible link on codesandbox.io if not sufficient information has been provided here.

Context

Just trying to run and compile the project.

Your Environment

Mac / Node

Tech
Version

React
"^15.6.1"

browser
Chrome