|
| 1 | +declare module "next" { |
| 2 | + declare type NextApp = { |
| 3 | + prepare(): Promise<void>; |
| 4 | + }; |
| 5 | + declare module.exports: (...opts: any) => NextApp |
| 6 | +} |
| 7 | + |
| 8 | +declare module "next/head" { |
| 9 | + declare module.exports: Class<React$Component<void, any, any>>; |
| 10 | +} |
| 11 | + |
| 12 | +declare module "next/link" { |
| 13 | + declare module.exports: Class<React$Component<void, {href: string}, any>>; |
| 14 | +} |
| 15 | + |
| 16 | +declare module "next/prefetch" { |
| 17 | + declare module.exports: Class<React$Component<void, {href: string, prefetch?: boolean}, any>>; |
| 18 | +} |
| 19 | + |
| 20 | +declare module "next/router" { |
| 21 | + declare module.exports: { |
| 22 | + route: string; |
| 23 | + pathname: string; |
| 24 | + query: Object; |
| 25 | + onRouteChangeStart: ?((url: string) => void); |
| 26 | + onRouteChangeComplete: ?((url: string) => void); |
| 27 | + onRouteChangeError: ?((err: Error & {cancelled: boolean}, url: string) => void); |
| 28 | + push(url: string, as: ?string): void; |
| 29 | + replace(url: string, as: ?string): void; |
| 30 | + }; |
| 31 | +} |
| 32 | + |
| 33 | +declare module "next/document" { |
| 34 | + declare export var Head: Class<React$Component<void, any, any>>; |
| 35 | + declare export var Main: Class<React$Component<void, any, any>>; |
| 36 | + declare export var NextScript: Class<React$Component<void, any, any>>; |
| 37 | + declare export default Class<React$Component<void, any, any>> & { |
| 38 | + getInitialProps: (ctx: any) => Promise<any>; |
| 39 | + renderPage(cb: Function): void; |
| 40 | + }; |
| 41 | +} |
0 commit comments