Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type alias for WithStylesProps #1254

Merged
merged 2 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Since you are interested in what happens next, in case, you work for a for-profi

---

### Bug fixes

- [react-jss] Add type alias for `WithStyles` ([1254](https://github.com/cssinjs/jss/pull/1254))

### Improvements

- [css-jss] Add TypeScript type definitions ([1247](https://github.com/cssinjs/jss/pull/1247))

## 10.0.3 (2020-1-1)

### Improvements
Expand Down
4 changes: 4 additions & 0 deletions packages/react-jss/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ declare const JssContext: Context<{
interface WithStylesProps<S extends Styles | ((theme: unknown) => Styles)> {
classes: Classes<S extends ((theme: unknown) => Styles) ? keyof ReturnType<S> : keyof S>
}
/**
* @deprecated Please use `WithStylesProps` instead
*/
type WithStyles<S extends Styles | ((theme: unknown) => Styles)> = WithStylesProps<S>

interface WithStylesOptions extends StyleSheetFactoryOptions {
index?: number
Expand Down