diff --git a/CHANGELOG.md b/CHANGELOG.md index b2eb9002..c039af53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change log +### vNext + +* Update/fix the existing TS `index.d.ts` declaration file.
+ [@hwillson](https://github.com/hwillson) in [#285](https://github.com/apollographql/graphql-tag/pull/285) + ### v2.10.1 * Fix failures in IE11 by avoiding unsupported (by IE11) constructor arguments to `Set` by [rocwang](https://github.com/rocwang) in [#190](https://github.com/apollographql/graphql-tag/pull/190) @@ -7,7 +12,7 @@ ### v2.10.0 * Add support for `graphql@14` by [timsuchanek](https://github.com/timsuchanek) in [#210](https://github.com/apollographql/graphql-tag/pull/210), [#211](https://github.com/apollographql/graphql-tag/pull/211) -### v2.9.1 +### v2.9.1 * Fix IE11 support by using a regular for-loop by [vitorbal](https://github.com/vitorbal) in [#176](https://github.com/apollographql/graphql-tag/pull/176) ### v2.9.0 diff --git a/index.d.ts b/index.d.ts index d010ae40..62532fff 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,20 @@ -export default function gql(literals: any, ...placeholders: any[]): any; -export function resetCaches(): void; -export function disableFragmentWarnings(): void; +declare module "graphql-tag" { + function gql( + literals: ReadonlyArray, + ...placeholders: any[] + ): import("graphql").DocumentNode + + namespace gql { + function resetCaches(): void; + function disableFragmentWarnings(): void; + function enableExperimentalFragmentVariables(): void; + function disableExperimentalFragmentVariables(): void; + } + + export default gql; + + export function resetCaches(): void; + export function disableFragmentWarnings(): void; + export function enableExperimentalFragmentVariables(): void; + export function disableExperimentalFragmentVariables(): void; +}