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