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 data property definition in @feathersjs/errors #2018

Merged
merged 1 commit into from
Nov 22, 2020
Merged

Fix data property definition in @feathersjs/errors #2018

merged 1 commit into from
Nov 22, 2020

Conversation

tinovyatkin
Copy link
Contributor

data is described in TypeScript definitions as always defined property, while from the actual implementation it can be undefined. As result direct assignment to and error.data.boo were not catched by TypeScript.

This PR fixes that definition to be according to actual code.

`data` is described in TypeScript definitions as always defined property, while from [the actual implementation](https://github.com/feathersjs/feathers/blob/c838d8bc4b8a78cb90a2d299bfe4f7b6b8d8c2f8/packages/errors/lib/index.js#L8) it can be undefined.
This PR fixes that definition to be according to actual code.
@daffl daffl merged commit ef1398c into feathersjs:crow Nov 22, 2020
@daffl
Copy link
Member

daffl commented Nov 22, 2020

Thank you! This has been updated already in the v5 (dove) branch but since it may still be a bit it makes sense to get it out for this version.

@tinovyatkin tinovyatkin deleted the patch-1 branch September 27, 2021 19:00
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.

2 participants