Sitelet https://web.archive.org/web/20201028100920/https://github.com/feathersjs/feathers/pull/2090
Skip to content
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

(TypeDef) Add user property to the Params. #2090

Open
wants to merge 2 commits into
base: crow
from

Conversation

@shihabmridha
Copy link

@shihabmridha shihabmridha commented Oct 12, 2020

Summary

I am using TypeScript. When I tried to access context.params.user property from the service hook the IntelliSense did not work. The reason is that the type of context.params is Params. But, Params does not contain the user field in it.

Solution

Add user property in the Params interface.

Checklist

  • Tell us about the problem your pull request is solving.
  • Are there any open issues that are related to this?
  • Is this PR dependent on PRs in other repos?
@J3m5
Copy link

@J3m5 J3m5 commented Oct 12, 2020

The user object could have a key with any value like Number or Boolean, shouldn't the type of key values be "any" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.