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:
parent
2528779394
commit
3a651971e1
|
@ -1,4 +1,5 @@
|
||||||
[ignore]
|
[ignore]
|
||||||
|
.*/node_modules/*
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// @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 @@
|
||||||
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import * as React from 'react'
|
||||||
import Layout from '../components/layout'
|
import Layout from '../components/layout'
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import * as React from 'react'
|
||||||
import Layout from '../components/layout'
|
import Layout from '../components/layout'
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @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" {
|
||||||
}
|
}
|
||||||
|
|
||||||
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" {
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue