Skip to content

Commit

Permalink
Improve the gql tagged template literal types
Browse files Browse the repository at this point in the history
The `gql` types were originally taken from
https://github.com/apollographql/graphql-tag/blob/50a850e484a60d95ddb99801c39785031e55b7a2/index.d.ts,
but those don't seem to be quite right, since the first argument
of a tagged template function is always an array of strings. Adjusting
to be more specific (thanks for catching this @benjamn).
  • Loading branch information
hwillson committed Jan 30, 2020
1 parent cd5ef01 commit 7364bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/graphql-tag.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// be fully updated to use Typescript, and these discrepancies will be fixed.

declare module 'graphql-tag' {
function gql(literals: any, ...placeholders: any[]): any;
function gql(literals: string[], ...placeholders: any[]): any;
namespace gql {
export function resetCaches(): void;
export function disableFragmentWarnings(): void;
Expand Down

0 comments on commit 7364bff

Please sign in to comment.