Skip to content

Commit dca5f07

Browse files
authored
Merge pull request #102 from judithhartmann/master
Fix Typescript Definition errors
2 parents ed344e1 + c0df281 commit dca5f07

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

index.d.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ declare module 'gatsby-plugin-intl' {
77
export class Link<TState> extends gatsby.Link<TState> {}
88
export const navigate: typeof gatsby.navigate;
99
export const changeLocale: (language: string, to?: string) => void;
10-
export const IntlContextProvider: React.Provider;
11-
export const IntlContextConsumer: React.Consumer;
12-
}
10+
11+
import { IntlShape } from "react-intl";
12+
interface GatsbyPluginIntlShape extends IntlShape {
13+
language: string;
14+
languages: string[];
15+
routed: boolean;
16+
originalPath: string;
17+
redirect: boolean;
18+
}
19+
export const IntlContextProvider: React.Provider<GatsbyPluginIntlShape>;
20+
export const IntlContextConsumer: React.Consumer<GatsbyPluginIntlShape>;
21+
}

0 commit comments

Comments
 (0)