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

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

ramijarrar
Copy link
Contributor

@ramijarrar ramijarrar commented May 15, 2024

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)).
Copy link
Member

@marshallswain marshallswain left a comment

Choose a reason for hiding this comment

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

Thank you!

@daffl daffl changed the title feat(schema): allow regular functions in resolvers fix(schema): allow regular functions in resolvers May 29, 2024
@daffl daffl changed the title fix(schema): allow regular functions in resolvers fix(schema): Allow regular functions in resolvers May 29, 2024
@daffl daffl merged commit 187868e into feathersjs:dove May 29, 2024
2 checks passed
@daffl
Copy link
Member

daffl commented May 29, 2024

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

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.

None yet

3 participants