Last active
June 23, 2019 11:33
-
-
Save negamaxi/887d87f9d60d0719f0bfb5414205df50 to your computer and use it in GitHub Desktop.
Create React App flow stubs
This file contains hidden or 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
[options] | |
module.name_mapper.extension='module.css' -> 'CSSModule' | |
module.name_mapper.extension='svg' -> 'SVGModule' | |
module.system=haste |
This file contains hidden or 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
// flow-typed/global/css-module-stub.js | |
// @flow | |
type CSSModuleType = { [key: string]: string }; | |
declare module "CSSModule" { | |
declare module.exports: CSSModuleType; | |
} |
This file contains hidden or 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
// flow-typed/global/svg-module-stub.js | |
// @flow | |
// TODO: create props type the right way | |
type SVGComponentPropsType = {| | |
className?: string | |
|}; | |
type SVGComponentType = (props: SVGComponentPropsType) => React$Element<"svg">; | |
type SVGModuleType = { | |
ReactComponent: SVGComponentType | |
}; | |
declare module "SVGModule" { | |
declare module.exports: SVGModuleType; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment