diff --git a/.flowconfig b/.flowconfig index cb19818a..836f6ec1 100644 --- a/.flowconfig +++ b/.flowconfig @@ -12,6 +12,8 @@ [options] module.system=haste +module.system.node.resolve_dirname=node_modules +module.system.node.resolve_dirname=src esproposal.class_static_fields=enable esproposal.class_instance_fields=enable diff --git a/flow-typed/gatsby-link.js b/flow-typed/gatsby-link.js new file mode 100644 index 00000000..d5fa9036 --- /dev/null +++ b/flow-typed/gatsby-link.js @@ -0,0 +1,3 @@ +declare module 'gatsby-link' { + declare module.exports: any; +} diff --git a/flow-typed/glamor.js b/flow-typed/glamor.js new file mode 100644 index 00000000..507ea4b7 --- /dev/null +++ b/flow-typed/glamor.js @@ -0,0 +1,7 @@ +declare module 'glamor' { + declare module.exports: { + css: { + global: (...params: any) => void, + }, + }; +} diff --git a/flow-typed/graphql.js b/flow-typed/graphql.js new file mode 100644 index 00000000..53685c1a --- /dev/null +++ b/flow-typed/graphql.js @@ -0,0 +1 @@ +declare function graphql(...params: any): any; diff --git a/src/components/Container/Container.js b/src/components/Container/Container.js index 8e17a2cb..266fa066 100644 --- a/src/components/Container/Container.js +++ b/src/components/Container/Container.js @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @emails react-core + * @flow */ 'use strict'; @@ -13,11 +14,13 @@ import React from 'react'; import {media} from 'theme'; +import type {Node} from 'react'; + /** * This component wraps page content sections (eg header, footer, main). * It provides consistent margin and max width behavior. */ -const Container = ({children}) => ( +const Container = ({children}: {children: Node}) => (