Skip to content

Commit

Permalink
Fix TS type definitions (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri authored Feb 10, 2019
1 parent 953234a commit a02b364
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/react-jss/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ComponentType, ReactNode} from 'react'
import {ComponentType, ReactNode, Context} from 'react'
import {
CreateGenerateId,
GenerateId,
Expand All @@ -19,6 +19,16 @@ declare const JssProvider: ComponentType<{
disableStylesGeneration?: boolean
children: ReactNode
}>
interface Managers {
[key: number]: StyleSheet,
}
declare const JssContext: Context<{
jss?: Jss,
registry?: SheetsRegistry,
managers?: Managers,
sheetOptions: StyleSheetFactoryOptions,
disableStylesGeneration: boolean
}>

type ThemedStyles<Theme> = (theme: Theme) => Styles

Expand Down Expand Up @@ -50,7 +60,8 @@ export {
WithStyles,
ThemeProvider,
withTheme,
createTheming
createTheming,
JssContext
}

export default withStyles

0 comments on commit a02b364

Please sign in to comment.