8000 (TypeDef) Add user property to the Params. by shihabmridha · Pull Request #2090 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
daffl merged 2 commits intofeathersjs:crowfrom
shihabmridha:crow
Nov 8, 2020
Merged

(TypeDef) Add user property to the Params.#2090
daffl merged 2 commits intofeathersjs:crowfrom
shihabmridha:crow

Conversation

@shihabmridha
Copy link
Contributor

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

@daffl daffl merged commit 1e94265 into feathersjs:crow Nov 8, 2020
@daffl
Copy link
Member
daffl commented Nov 8, 2020

Thank you!

@bwgjoseph bwgjoseph mentioned this pull request Dec 14, 2020
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.

3 participants

0