Skip to content

Commit

Permalink
[docs] TS decorating reword (mui#11923)
Browse files Browse the repository at this point in the history
Changes the wording to be more consistent with the other docs and ES.
  • Loading branch information
swpease authored and Joe Shelby committed Jul 14, 2018
1 parent 00f63f1 commit e847eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/pages/guides/typescript/typescript.md
Expand Up @@ -120,7 +120,7 @@ interface Props extends WithStyles<typeof styles> {

### Decorating components

Applying the `withStyles(styles)` decorator as a function works as expected:
Applying `withStyles(styles)` as a function works as expected:

```tsx
const DecoratedSFC = withStyles(styles)(({ text, type, color, classes }: Props) => (
Expand All @@ -143,7 +143,7 @@ const DecoratedClass = withStyles(styles)(
);
```

Unfortunately due to a [current limitation of TypeScript decorators](https://github.com/Microsoft/TypeScript/issues/4881), `withStyles` can't be used as a decorator in TypeScript.
Unfortunately due to a [current limitation of TypeScript decorators](https://github.com/Microsoft/TypeScript/issues/4881), `withStyles(styles)` can't be used as a decorator in TypeScript.

### Union props

Expand Down

0 comments on commit e847eeb

Please sign in to comment.