Commit 3a651971 authored by dsantic's avatar dsantic Committed by Tim Neutkens

Upgrading with-flow example to the latest flow-bin ver. 0.59.0 (#3337)

For upgrading I used flow-upgrade module by https://yarnpkg.com/en/package/flow-upgrade
parent 25287793
[ignore] [ignore]
.*/node_modules/*
[include] [include]
......
// @flow // @flow
import type {Element} from 'React' import * as React from 'react'
import Link from 'next/link' import Link from 'next/link'
import Head from 'next/head' import Head from 'next/head'
type Props = { type Props = {
children?: Element<any>, children?: React.Element<any>,
title?: string title?: string
} }
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
"devDependencies": { "devDependencies": {
"babel-eslint": "^7.1.1", "babel-eslint": "^7.1.1",
"babel-plugin-transform-flow-strip-types": "^6.21.0", "babel-plugin-transform-flow-strip-types": "^6.21.0",
"flow-bin": "^0.37.4" "flow-bin": "^0.59.0"
} }
} }
// @flow // @flow
import * as React from 'react'
import Layout from '../components/layout' import Layout from '../components/layout'
export default () => ( export default () => (
......
// @flow // @flow
import * as React from 'react'
import Layout from '../components/layout' import Layout from '../components/layout'
export default () => ( export default () => (
......
// @flow // @flow
import * as React from 'react'
import Layout from '../components/layout' import Layout from '../components/layout'
export default () => ( export default () => (
......
...@@ -13,15 +13,15 @@ declare module "next" { ...@@ -13,15 +13,15 @@ declare module "next" {
} }
declare module "next/head" { declare module "next/head" {
declare module.exports: Class<React$Component<void, any, any>>; declare module.exports: Class<React$Component<any, any>>;
} }
declare module "next/link" { declare module "next/link" {
declare module.exports: Class<React$Component<void, {href: string, prefetch?: bool}, any>>; declare module.exports: Class<React$Component<{href: string, prefetch?: bool}, any>>;
} }
declare module "next/error" { declare module "next/error" {
declare module.exports: Class<React$Component<void, {statusCode: number}, any>>; declare module.exports: Class<React$Component<{statusCode: number}, any>>;
} }
declare module "next/router" { declare module "next/router" {
...@@ -38,10 +38,10 @@ declare module "next/router" { ...@@ -38,10 +38,10 @@ declare module "next/router" {
} }
declare module "next/document" { declare module "next/document" {
declare export var Head: Class<React$Component<void, any, any>>; declare export var Head: Class<React$Component<any, any>>;
declare export var Main: Class<React$Component<void, any, any>>; declare export var Main: Class<React$Component<any, any>>;
declare export var NextScript: Class<React$Component<void, any, any>>; declare export var NextScript: Class<React$Component<any, any>>;
declare export default Class<React$Component<void, any, any>> & { declare export default Class<React$Component<any, any>> & {
getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, jsonPageRes?: any, err?: any}) => Promise<any>; getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, jsonPageRes?: any, err?: any}) => Promise<any>;
renderPage(cb: Function): void; renderPage(cb: Function): void;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment