From aee5981dd8ad1c09574887dfb84fb6691845db1b Mon Sep 17 00:00:00 2001 From: Nikki Kononov Date: Tue, 16 Jan 2018 22:01:55 +0200 Subject: [PATCH 1/2] Add typings for to property of Gatsby Link --- packages/gatsby-link/index.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/gatsby-link/index.d.ts b/packages/gatsby-link/index.d.ts index 70510e4f56f18..0d22b141c032d 100644 --- a/packages/gatsby-link/index.d.ts +++ b/packages/gatsby-link/index.d.ts @@ -1,14 +1,15 @@ -import * as React from "react"; -import { NavLinkProps } from "react-router-dom"; +import * as React from "react" +import { NavLinkProps } from "react-router-dom" export interface GatsbyLinkProps extends NavLinkProps { onClick?: (event: any) => void className?: string - style?:any; + style?: any + to: string } -export const navigateTo: (path: string) => void; +export const navigateTo: (path: string) => void -export const withPrefix: (path: string) => string; +export const withPrefix: (path: string) => string -export default class GatsbyLink extends React.Component { } +export default class GatsbyLink extends React.Component {} From 65cf341ec29f8e5e3062448176ad05057a321e23 Mon Sep 17 00:00:00 2001 From: Nikki Kononov Date: Wed, 17 Jan 2018 08:13:34 +0200 Subject: [PATCH 2/2] Change type from string to any as objects can also be used --- packages/gatsby-link/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-link/index.d.ts b/packages/gatsby-link/index.d.ts index 0d22b141c032d..80cb17561ef1e 100644 --- a/packages/gatsby-link/index.d.ts +++ b/packages/gatsby-link/index.d.ts @@ -5,7 +5,7 @@ export interface GatsbyLinkProps extends NavLinkProps { onClick?: (event: any) => void className?: string style?: any - to: string + to: any } export const navigateTo: (path: string) => void