1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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
This commit is contained in:
dsantic 2017-12-03 23:58:46 +01:00 committed by Tim Neutkens
parent 2528779394
commit 3a651971e1
7 changed files with 14 additions and 13 deletions

View file

@ -1,4 +1,5 @@
[ignore]
.*/node_modules/*
[include]

View file

@ -1,11 +1,11 @@
// @flow
import type {Element} from 'React'
import * as React from 'react'
import Link from 'next/link'
import Head from 'next/head'
type Props = {
children?: Element<any>,
children?: React.Element<any>,
title?: string
}

View file

@ -17,6 +17,6 @@
"devDependencies": {
"babel-eslint": "^7.1.1",
"babel-plugin-transform-flow-strip-types": "^6.21.0",
"flow-bin": "^0.37.4"
"flow-bin": "^0.59.0"
}
}

View file

@ -1,5 +1,5 @@
// @flow
import * as React from 'react'
import Layout from '../components/layout'
export default () => (

View file

@ -1,5 +1,5 @@
// @flow
import * as React from 'react'
import Layout from '../components/layout'
export default () => (

View file

@ -1,5 +1,5 @@
// @flow
import * as React from 'react'
import Layout from '../components/layout'
export default () => (

View file

@ -13,15 +13,15 @@ declare module "next" {
}
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.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.exports: Class<React$Component<void, {statusCode: number}, any>>;
declare module.exports: Class<React$Component<{statusCode: number}, any>>;
}
declare module "next/router" {
@ -38,10 +38,10 @@ declare module "next/router" {
}
declare module "next/document" {
declare export var Head: Class<React$Component<void, any, any>>;
declare export var Main: Class<React$Component<void, any, any>>;
declare export var NextScript: Class<React$Component<void, any, any>>;
declare export default Class<React$Component<void, any, any>> & {
declare export var Head: Class<React$Component<any, any>>;
declare export var Main: Class<React$Component<any, any>>;
declare export var NextScript: Class<React$Component<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>;
renderPage(cb: Function): void;
};