Skip to content

Commit 668ad1a

Browse files
committed
Update navigateTo types
1 parent 31e9adb commit 668ad1a

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

packages/gatsby-link/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import * as React from "react";
22
import { NavLinkProps } from "react-router-dom";
3+
import { LocationDescriptor } from "history";
34

45
export interface GatsbyLinkProps extends NavLinkProps {
56
onClick?: (event: any) => void
67
className?: string
78
style?:any;
89
}
910

10-
export const navigateTo: (path: string) => void;
11+
export const navigateTo: (to: LocationDescriptor) => void;
1112

1213
export const withPrefix: (path: string) => string;
1314

packages/gatsby-link/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"gatsby": "^1.0.0"
2424
},
2525
"dependencies": {
26+
"@types/history": "^4.6.2",
2627
"@types/react-router-dom": "^4.2.2",
2728
"babel-runtime": "^6.26.0",
2829
"prop-types": "^15.5.8",

yarn.lock

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# yarn lockfile v1
33

44

5+
"@types/history@*", "@types/history@^4.6.2":
6+
version "4.6.2"
7+
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0"
8+
59
"@types/inline-style-prefixer@^3.0.0":
610
version "3.0.1"
711
resolved "https://registry.yarnpkg.com/@types/inline-style-prefixer/-/inline-style-prefixer-3.0.1.tgz#8541e636b029124b747952e9a28848286d2b5bf6"
@@ -14,6 +18,21 @@
1418
version "6.0.90"
1519
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.90.tgz#0ed74833fa1b73dcdb9409dcb1c97ec0a8b13b02"
1620

21+
"@types/react-router-dom@^4.2.2":
22+
version "4.2.3"
23+
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.3.tgz#06e0b67ff536adc0681dffdbe592ae91fb85887d"
24+
dependencies:
25+
"@types/history" "*"
26+
"@types/react" "*"
27+
"@types/react-router" "*"
28+
29+
"@types/react-router@*":
30+
version "4.0.21"
31+
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.21.tgz#d6c7ea3b45dba02eb8f869629f3b7d7b6e9a7938"
32+
dependencies:
33+
"@types/history" "*"
34+
"@types/react" "*"
35+
1736
"@types/react@*":
1837
version "16.0.18"
1938
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.18.tgz#c08eea79ada55bf10b5353e18c21797dd17afa23"
@@ -11970,6 +11989,10 @@ shallow-clone@^0.1.2:
1197011989
lazy-cache "^0.2.3"
1197111990
mixin-object "^2.0.1"
1197211991

11992+
shallow-compare@^1.2.2:
11993+
version "1.2.2"
11994+
resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb"
11995+
1197311996
shallow-equal@^1.0.0:
1197411997
version "1.0.0"
1197511998
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.0.0.tgz#508d1838b3de590ab8757b011b25e430900945f7"

0 commit comments

Comments
 (0)