Skip to content

[types/ejs] Also return undefined in Cache.get()#24807

Merged
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Maxr1998:patch-1
Apr 9, 2018
Merged

[types/ejs] Also return undefined in Cache.get()#24807
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
Maxr1998:patch-1

Conversation

@Maxr1998
Copy link
Copy Markdown
Contributor

@Maxr1998 Maxr1998 commented Apr 8, 2018

As lru-cache has V | undefined as get() return, this get() function should also mark undefined as possible return type to allow assigning an LRU to cache.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

As lru-cache has `V | undefined`, this `get()` function should also mark undefined as possible return type to allow assigning an LRU to `cache`.
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 8, 2018

@Maxr1998 Thank you for submitting this PR!

🔔 @benliddicott - 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.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

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

@mhegazy mhegazy merged commit 089d570 into DefinitelyTyped:master Apr 9, 2018
@Maxr1998 Maxr1998 deleted the patch-1 branch April 9, 2018 17:58
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.

4 participants