8000 Fix `data` property definition in @feathersjs/errors by tinovyatkin · Pull Request #2018 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

Fix data property definition in @feathersjs/errors#2018

Merged
daffl merged 1 commit intofeathersjs:crowfeathersjs/feathers:crowfrom
tinovyatkin:patch-1
Nov 22, 2020
Merged

Fix data property definition in @feathersjs/errors#2018
daffl merged 1 commit intofeathersjs:crowfrom
tinovyatkin:patch-1

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

0