Skip to content
Permalink
Browse files

Added some basic Flow types to get things started

  • Loading branch information...
bvaughn committed Oct 5, 2017
1 parent 8d54bd0 commit 1de4c66dc677646a63344e5138f3bf9e0c0d3f76
@@ -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
@@ -0,0 +1,3 @@
declare module 'gatsby-link' {
declare module.exports: any;
}
@@ -0,0 +1,7 @@
declare module 'glamor' {
declare module.exports: {
css: {
global: (...params: any) => void,
},
};
}
@@ -0,0 +1 @@
declare function graphql(...params: any): any;
@@ -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}) => (
<div
css={{
paddingLeft: 20,
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
*/

'use strict';

This file was deleted.

Oops, something went wrong.
@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
* @flow
*/

'use strict';

@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
* @flow
*/

'use strict';

@@ -19,7 +20,13 @@ import {colors, media, sharedStyles} from 'theme';
import toCommaSeparatedList from 'utils/toCommaSeparatedList';
import MetaTitle from 'templates/components/MetaTitle';

const AllBlogPosts = ({data}) => (
import type {allMarkdownRemarkData} from 'types';

type Props = {
data: allMarkdownRemarkData,
};

const AllBlogPosts = ({data}: Props) => (
<Container>
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
* @flow
*/

'use strict';

@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
* @flow
*/

'use strict';

@@ -4,19 +4,15 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @providesModule site-constants
* @flow
*/
*/

'use strict';

/**
* Variables shared by multiple components.
*/
// NOTE: We can't just use `location.toString()` because when we are rendering
// the SSR part in node.js we won't have a proper location.
const urlRoot = 'https://reactjs.org';
const version = '16.0.0';

export default {
// NOTE: We can't just use `location.toString()` because when we are rendering
// the SSR part in node.js we won't have a proper location.
urlRoot: 'https://reactjs.org',
version: '16.0.0',
};
export {urlRoot, version};
@@ -4,9 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @providesModule theme
* @flow
*/
*/

'use strict';

@@ -399,9 +399,4 @@ const sharedStyles = {
},
};

export default {
colors,
fonts,
media,
sharedStyles,
};
export {colors, fonts, media, sharedStyles};
@@ -0,0 +1,44 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @flow
*/

export type Author = {
name: string,
url: string,
};

export type Node = {
excerpt: string,
fields: {
date?: string,
path: string,
redirect: string,
slug: string,
},
frontmatter: {
author?: Array<Author>,
next?: string,
prev?: string,
title: string,
},
html: string,
id: string,
};

export type Edge = {
node: Node,
};

export type allMarkdownRemarkData = {
allMarkdownRemark: {
edges: Array<Edge>,
},
};

export type markdownRemarkData = Node;
@@ -109,7 +109,7 @@ const linkCss = {
},
};

export default {
export {
createLinkBlog,
createLinkCommunity,
createLinkDocs,

0 comments on commit 1de4c66

Please sign in to comment.
You can’t perform that action at this time.