Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a TypeScript declaration file for graphql-hooks-memcache #137

Merged
merged 2 commits into from
Mar 15, 2019

Conversation

jackdclark
Copy link
Contributor

What does this PR do?

Adds a https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html for graphql-hooks-memcache that will be published to npm, so that the package works well with TypeScript.

Related issues

#91

Checklist

  • I have checked the contributing document
  • I have added or updated any relevant documentation
  • I have added or updated any relevant tests

@jackdclark jackdclark force-pushed the feat/type-declarations-memcache branch from 60efa7d to 1280370 Compare March 13, 2019 17:09
@jackdclark jackdclark marked this pull request as ready for review March 13, 2019 17:10
@@ -5,6 +5,7 @@
"main": "lib/graphql-hooks-memcache.js",
"module": "es/graphql-hooks-memcache.js",
"unpkg": "dist/graphql-hooks-memcache.min.js",
"types": "index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll have to add this file to the files array on line 14

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes good spot, I did this in #135.

@jackdclark jackdclark force-pushed the feat/type-declarations-memcache branch from 1280370 to e955ff8 Compare March 14, 2019 11:38
Copy link
Contributor

@bmullan91 bmullan91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

}): MemCache

interface MemCache {
get(keyObject: object): object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically keyObject could be any, but graphql-hooks gives it an object 😆

@jackdclark jackdclark merged commit 03a1f43 into master Mar 15, 2019
@jackdclark jackdclark deleted the feat/type-declarations-memcache branch March 15, 2019 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants