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

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

@ramijarrar ramijarrar commented May 15, 2024

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 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.

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
@daffl

daffl commented May 29, 2024

Copy link
Copy Markdown
Member

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