[types/ejs] Also return undefined in Cache.get()#24807
Merged
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom Apr 9, 2018
Maxr1998:patch-1
Merged
[types/ejs] Also return undefined in Cache.get()#24807mhegazy merged 1 commit intoDefinitelyTyped:masterfrom Maxr1998:patch-1
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Maxr1998:patch-1
Conversation
As lru-cache has `V | undefined`, this `get()` function should also mark undefined as possible return type to allow assigning an LRU to `cache`.
Contributor
|
@Maxr1998 Thank you for submitting this PR! 🔔 @benliddicott - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
benliddicott
approved these changes
Apr 8, 2018
Contributor
|
A definition author has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As lru-cache has
V | undefinedasget()return, thisget()function should also mark undefined as possible return type to allow assigning an LRU tocache.npm test.)npm run lint package-name(ortscif notslint.jsonis present).If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }.