Last active
July 25, 2016 22:25
-
-
Save bezawislak/24026f8130a0fdee7a9d83117023c695 to your computer and use it in GitHub Desktop.
React CSSModules typings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'react-css-modules' { | |
interface Options { | |
allowMultiple?: boolean; | |
errorWhenNotFound?: boolean; | |
} | |
module Decorator { | |
interface Props { | |
styles?: any; | |
styleName?: string; | |
} | |
} | |
interface Decorator { | |
(defaultStyles: any, options?: Options): any; | |
} | |
const Decorator: Decorator; | |
export = Decorator; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'react-css-modules' { | |
interface Options { | |
allowMultiple?: boolean; | |
errorWhenNotFound?: boolean; | |
} | |
module CSSModules { | |
interface Props { | |
styles?: any; | |
styleName?: string; | |
} | |
} | |
interface CSSModules { | |
(defaultStyles: any, options?: Options): any; | |
} | |
const CSSModules: CSSModules; | |
export = CSSModules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason it's not importing it properly. The actual function is in
CSSModules.default
so I have to do something like this which is kind of ugly: