Skip to content

Commit

Permalink
Fix createStyleSheet type definitions error #495
Browse files Browse the repository at this point in the history
  • Loading branch information
bigslycat committed May 17, 2017
1 parent 27b3c43 commit 780002a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Jss.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import findRenderer from './utils/findRenderer'
import type {
Rule,
RuleOptions,
StyleSheetOptions,
StyleSheetFactoryOptions,
Plugin,
JssOptions,
JssStyle
Expand Down Expand Up @@ -44,7 +44,7 @@ export default class Jss {
/**
* Create a Style Sheet.
*/
createStyleSheet(styles: Object, options: StyleSheetOptions): StyleSheet {
createStyleSheet(styles: Object, options: StyleSheetFactoryOptions = {}): StyleSheet {
const sheet = new StyleSheet(styles, {
jss: (this: Jss),
generateClassName: this.options.generateClassName,
Expand Down
13 changes: 13 additions & 0 deletions src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ export type StyleSheetOptions = {
jss: Jss
}

export type StyleSheetFactoryOptions = {
media?: string,
meta?: string,
index?: number,
insertionPoint?: string,
link?: boolean,
element?: HTMLStyleElement,
virtual?: boolean,
Renderer?: Function,
generateClassName?: generateClassName,
jss?: Jss
}

export type InternalStyleSheetOptions = {
media?: string,
meta?: string,
Expand Down

0 comments on commit 780002a

Please sign in to comment.