From 98ffd67d23d936270cf5b3256f3a5928487bf557 Mon Sep 17 00:00:00 2001 From: alxshelepenok Date: Fri, 19 Jul 2019 23:38:20 +0300 Subject: [PATCH] chore(deps): update flow-bin --- package.json | 2 +- src/templates/post-template.js | 7 ++++--- src/types/index.js | 8 ++++++-- yarn.lock | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 11827e5..a505e40 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "eslint-plugin-react": "7.14.2", "eslint-watch": "6.0.0", "flow-typed": "^2.6.0", - "flow-bin": "^0.98.1", + "flow-bin": "^0.103.0", "gh-pages": "2.0.1", "identity-obj-proxy": "3.0.0", "jest": "24.8.0", diff --git a/src/templates/post-template.js b/src/templates/post-template.js index 67aafc9..0c1c697 100644 --- a/src/templates/post-template.js +++ b/src/templates/post-template.js @@ -1,3 +1,4 @@ +// @flow import React from 'react'; import { graphql } from 'gatsby'; import Layout from '../components/Layout'; @@ -6,7 +7,9 @@ import { useSiteMetadata } from '../hooks'; import type { MarkdownRemark } from '../types'; type Props = { - data: MarkdownRemark + data: { + markdownRemark: MarkdownRemark + } }; const PostTemplate = ({ data }: Props) => { @@ -21,7 +24,6 @@ const PostTemplate = ({ data }: Props) => { ); }; - export const query = graphql` query PostBySlug($slug: String!) { markdownRemark(fields: { slug: { eq: $slug } }) { @@ -41,5 +43,4 @@ export const query = graphql` } `; - export default PostTemplate; diff --git a/src/types/index.js b/src/types/index.js index da5e2f7..76f8eec 100644 --- a/src/types/index.js +++ b/src/types/index.js @@ -1,9 +1,13 @@ // @flow import type { Node as ReactNode } from 'react'; -export type RenderCallback = (data: any) => ReactNode; +export type RenderCallback = { + render: (data: any) => ReactNode; +} -export type Entry = (string[]) => string; +export type Entry = { + getIn: (string[]) => string; +} export type WidgetFor = (string) => string; diff --git a/yarn.lock b/yarn.lock index 5e52b7e..b42cdae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5326,9 +5326,9 @@ flatted@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" -flow-bin@^0.98.1: - version "0.98.1" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.98.1.tgz#a8d781621c91703df69928acc83c9777e2fcbb49" +flow-bin@^0.103.0: + version "0.103.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.103.0.tgz#7aec510d85e1c1b0f2b912bb988337d70035cb0f" flow-typed@^2.6.0: version "2.6.0"