[keyv] Add typings for Keyv.opts class property#59154
[keyv] Add typings for Keyv.opts class property#59154typescript-bot merged 2 commits intoDefinitelyTyped:masterfrom
Keyv.opts class property#59154Conversation
Keyv instances have a property `this.opts` (an object) which contains both a known set of properties which are always assigned (deserialize, namespace, serialize, store, and uri) as well as a set of optional properties, as well as a set of arbitrary properties which can be provided by the implementor. This commit exposes the `Keyv.opts` property and allows the implementor to optionally type the arbitrary options they've provided via a new, second type parameter to the Keyv class.
|
@trevor-scheer Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 59154,
"author": "trevor-scheer",
"headCommitOid": "b01c56d81f2f3e73f6ed39308474424adf8e964f",
"mergeBaseOid": "db23239e64168b3bf75e62d78aad6225c005e0b1",
"lastPushDate": "2022-03-05T16:47:44.000Z",
"lastActivityDate": "2022-03-17T05:23:28.000Z",
"maintainerBlessed": "Waiting for Code Reviews",
"mergeOfferDate": "2022-03-17T02:53:00.000Z",
"mergeRequestDate": "2022-03-17T05:23:28.000Z",
"mergeRequestUser": "trevor-scheer",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "keyv",
"kind": "edit",
"files": [
{
"path": "types/keyv/index.d.ts",
"kind": "definition"
},
{
"path": "types/keyv/keyv-tests.ts",
"kind": "test"
}
],
"owners": [
"Arylo",
"BendingBender"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "Arylo",
"date": "2022-03-17T02:52:19.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1059795225,
"ciResult": "pass"
} |
|
🔔 @Arylo @BendingBender — please review this PR in the next few days. Be sure to explicitly select |
|
Ping @Arylo @BendingBender @RyanCavanaugh what needs to happen for movement on this - do I understand correctly that this goes to a TS / DT maintainer once it's considered stale? Semi-related: happy to add myself as a maintainer for these types, we'll be actively using this package in Apollo Server v4. |
|
Re-ping @Arylo, @BendingBender: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
@trevor-scheer: Everything looks good here. I am ready to merge this PR (at b01c56d) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@Arylo, @BendingBender: you can do this too.) |
|
Ready to merge |
Keyv instances have a property
this.opts(an object) which contains both a known set of properties which are always assigned (deserialize,namespace,serialize,store, anduri) as well as a set of optional properties, as well as a set of arbitrary properties which can be provided by the implementor.This commit exposes the
Keyv.optsproperty and allows the implementor to optionally type the arbitrary options they've provided via a new, second type parameter to theKeyvclass.The known set of properties comes from assignments that happen in the
constructor:https://github.com/jaredwray/keyv/blob/master/packages/keyv/src/index.js#L36-L49
Please fill in this template.
npm test <package to test>.Select one of these and delete the others:
If changing an existing definition: