FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(schema): Allow regular functions in resolvers by ramijarrar · Pull Request #3487 · feathersjs/feathers · GitHub

fix(schema): Allow regular functions in resolvers - #3487

Merged
daffl merged 1 commit into
feathersjs:dovefrom
avorra:resolver-types-regfunc
May 29, 2024
Merged

fix(schema): Allow regular functions in resolvers#3487
daffl merged 1 commit into
feathersjs:dovefrom
avorra:resolver-types-regfunc

Conversation

ramijarrar commented May 15, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Alters the expected return type of property resolvers and converters from Promise<T> to Promise<T> | T.

This ensures users are not forced to unnecessarily provide async functions with no await expression, which is often considered bad practice and disallowed by linting rules.

Alters the expected return type of property resolvers and converters from "Promise<T>" to "Promise<T> | T".

This ensures users are not forced to unnecessarily provide async functions with no await expression, which is considered bad practice and often disallowed by linting rules (see typescript-eslint/typescript-eslint#7536 (comment)).

marshallswain left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you!

daffl changed the title feat(schema): allow regular functions in resolvers fix(schema): allow regular functions in resolvers May 29, 2024
daffl changed the title fix(schema): allow regular functions in resolvers fix(schema): Allow regular functions in resolvers May 29, 2024
daffl merged commit 187868e into feathersjs:dove May 29, 2024

daffl commented May 29, 2024

Copy link
Copy Markdown
Member

This is a really good change. Will go out with the next release!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL