diff --git a/flow-typed/glamor.js b/flow-typed/glamor.js index 507ea4b7..d6ae5ca4 100644 --- a/flow-typed/glamor.js +++ b/flow-typed/glamor.js @@ -5,3 +5,17 @@ declare module 'glamor' { }, }; } + +declare module 'glamor/react' { + declare module.exports: { + createElement: any, + dom: any, + vars: any, + makeTheme: any, + propMerge: Function, + }; +} + +declare module 'glamor/reset' { + declare module.exports: any; +} diff --git a/flow-typed/polyfills.js b/flow-typed/polyfills.js new file mode 100644 index 00000000..9aa0daec --- /dev/null +++ b/flow-typed/polyfills.js @@ -0,0 +1,11 @@ +declare module 'array-from' { + declare module.exports: any; +} + +declare module 'string.prototype.includes' { + declare module.exports: any; +} + +declare module 'string.prototype.repeat' { + declare module.exports: any; +} diff --git a/flow-typed/slugify.js b/flow-typed/slugify.js new file mode 100644 index 00000000..82a44ce4 --- /dev/null +++ b/flow-typed/slugify.js @@ -0,0 +1,3 @@ +declare module 'slugify' { + declare module.exports: any; +} diff --git a/src/components/Flex/Flex.js b/src/components/Flex/Flex.js index 6acc11e6..8784aa79 100644 --- a/src/components/Flex/Flex.js +++ b/src/components/Flex/Flex.js @@ -2,12 +2,27 @@ * Copyright (c) 2013-present, Facebook, Inc. * * @emails react-core + * @flow */ 'use strict'; import {createElement} from 'glamor/react'; +import type {Node} from 'react'; + +type Props = { + basis: string, + children: Node, + direction: string, + grow: number, + halign: string, + shrink: number, + type: string, + valign: string, + rest: Array, +}; + /** * Convenience component for declaring a flexbox layout. */ @@ -21,7 +36,7 @@ const Flex = ({ type = 'div', valign = 'flex-start', ...rest -}) => +}: Props) => createElement( type, { diff --git a/src/components/LayoutFooter/ExternalFooterLink.js b/src/components/LayoutFooter/ExternalFooterLink.js index 04632fda..1d77ed6c 100644 --- a/src/components/LayoutFooter/ExternalFooterLink.js +++ b/src/components/LayoutFooter/ExternalFooterLink.js @@ -2,6 +2,7 @@ * Copyright (c) 2013-present, Facebook, Inc. * * @emails react-core + * @flow */ 'use strict'; @@ -10,7 +11,16 @@ import React from 'react'; import {colors} from 'theme'; import ExternalLinkSvg from 'templates/components/ExternalLinkSvg'; -const ExternalFooterLink = ({children, href, target, rel}) => ( +import type {Node} from 'react'; + +type Props = { + children: Node, + href: string, + target?: string, + rel?: string, +}; + +const ExternalFooterLink = ({children, href, target, rel}: Props) => ( ( +const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (