-
Notifications
You must be signed in to change notification settings - Fork 90
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
Conversation
60efa7d
to
1280370
Compare
@@ -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", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
1280370
to
e955ff8
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 😆
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