Skip to content

[keyv] Add typings for Keyv.opts class property#59154

Merged
typescript-bot merged 2 commits intoDefinitelyTyped:masterfrom
trevor-scheer:trevor/keyv-opts
Mar 17, 2022
Merged

[keyv] Add typings for Keyv.opts class property#59154
typescript-bot merged 2 commits intoDefinitelyTyped:masterfrom
trevor-scheer:trevor/keyv-opts

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

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.

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.

Select one of these and delete the others:

If changing an existing definition:

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.
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Mar 5, 2022

@trevor-scheer Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

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"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @Arylo @BendingBender — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@trevor-scheer
Copy link
Copy Markdown
Contributor Author

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.

@typescript-bot
Copy link
Copy Markdown
Contributor

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!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Mar 16, 2022
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Mar 17, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

@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:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@Arylo, @BendingBender: you can do this too.)

@trevor-scheer
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 6963e48 into DefinitelyTyped:master Mar 17, 2022
@trevor-scheer trevor-scheer deleted the trevor/keyv-opts branch March 17, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants