Skip to content

Type definition for req.user#833

Merged
OmTheTurtle merged 2 commits intomasterfrom
feat/req-user
Aug 28, 2021
Merged

Type definition for req.user#833
OmTheTurtle merged 2 commits intomasterfrom
feat/req-user

Conversation

@tomitheninja
Copy link
Copy Markdown
Contributor

By defining a User inteface inside express we can tell express the type of the req.user object.

Previously we had to cast req.user to User, every time we used it.

Now no casts are needed, as req.user already has the type of User.

yarn build:prod runs successfully and vscode provides autointel on req.user

@tomitheninja tomitheninja added enhancement New feature or request low priority No hurry, this can wait. labels Aug 28, 2021
@tomitheninja tomitheninja self-assigned this Aug 28, 2021
@OmTheTurtle OmTheTurtle merged commit 01940ff into master Aug 28, 2021
@OmTheTurtle OmTheTurtle deleted the feat/req-user branch August 28, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request low priority No hurry, this can wait.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants