Skip to content

Commit f8f9095

Browse files
timneutkensarunoda
authored andcommitted
Add prefetch to propTypes + flow typings (#1295)
1 parent 8399ea7 commit f8f9095

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/with-flow/types/next.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare module "next/head" {
1717
}
1818

1919
declare module "next/link" {
20-
declare module.exports: Class<React$Component<void, {href: string}, any>>;
20+
declare module.exports: Class<React$Component<void, {href: string, prefetch?: bool}, any>>;
2121
}
2222

2323
declare module "next/error" {

lib/link.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default class Link extends Component {
1010
}
1111

1212
static propTypes = {
13+
prefetch: PropTypes.bool,
1314
children: PropTypes.oneOfType([
1415
PropTypes.element,
1516
(props, propName) => {

0 commit comments

Comments
 (0)