Skip to content

Commit

Permalink
Update navigateTo types
Browse files Browse the repository at this point in the history
  • Loading branch information
nsimonson committed Feb 1, 2018
1 parent 31e9adb commit 668ad1a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby-link/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as React from "react";
import { NavLinkProps } from "react-router-dom";
import { LocationDescriptor } from "history";

export interface GatsbyLinkProps extends NavLinkProps {
onClick?: (event: any) => void
className?: string
style?:any;
}

export const navigateTo: (path: string) => void;
export const navigateTo: (to: LocationDescriptor) => void;

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

Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"gatsby": "^1.0.0"
},
"dependencies": {
"@types/history": "^4.6.2",
"@types/react-router-dom": "^4.2.2",
"babel-runtime": "^6.26.0",
"prop-types": "^15.5.8",
Expand Down
23 changes: 23 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# yarn lockfile v1


"@types/history@*", "@types/history@^4.6.2":
version "4.6.2"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0"

"@types/inline-style-prefixer@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/inline-style-prefixer/-/inline-style-prefixer-3.0.1.tgz#8541e636b029124b747952e9a28848286d2b5bf6"
Expand All @@ -14,6 +18,21 @@
version "6.0.90"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.90.tgz#0ed74833fa1b73dcdb9409dcb1c97ec0a8b13b02"

"@types/react-router-dom@^4.2.2":
version "4.2.3"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.3.tgz#06e0b67ff536adc0681dffdbe592ae91fb85887d"
dependencies:
"@types/history" "*"
"@types/react" "*"
"@types/react-router" "*"

"@types/react-router@*":
version "4.0.21"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.21.tgz#d6c7ea3b45dba02eb8f869629f3b7d7b6e9a7938"
dependencies:
"@types/history" "*"
"@types/react" "*"

"@types/react@*":
version "16.0.18"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.18.tgz#c08eea79ada55bf10b5353e18c21797dd17afa23"
Expand Down Expand Up @@ -11970,6 +11989,10 @@ shallow-clone@^0.1.2:
lazy-cache "^0.2.3"
mixin-object "^2.0.1"

shallow-compare@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb"

shallow-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.0.0.tgz#508d1838b3de590ab8757b011b25e430900945f7"
Expand Down

0 comments on commit 668ad1a

Please sign in to comment.