From a02b364a7c11f18e57c9840ea1378ff7458a5d1e Mon Sep 17 00:00:00 2001 From: Henri Date: Sun, 10 Feb 2019 22:37:34 +0100 Subject: [PATCH] Fix TS type definitions (#1030) --- packages/react-jss/src/index.d.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/react-jss/src/index.d.ts b/packages/react-jss/src/index.d.ts index b4bc17413..7898486ef 100644 --- a/packages/react-jss/src/index.d.ts +++ b/packages/react-jss/src/index.d.ts @@ -1,4 +1,4 @@ -import {ComponentType, ReactNode} from 'react' +import {ComponentType, ReactNode, Context} from 'react' import { CreateGenerateId, GenerateId, @@ -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) => Styles @@ -50,7 +60,8 @@ export { WithStyles, ThemeProvider, withTheme, - createTheming + createTheming, + JssContext } export default withStyles