effector / effector/farfetched
Add opportunity to directly assign `undefined` for optional properties
Open
needs triage
scope:core
- Dominant language
- TypeScript
- Stars
- 221
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Right now, we cannot assign the undefined property value, even if it is optional. So it forces to write additional boilerplate to return empty object instead of undefined property. For example:
``` js
const getProperty = () => {
if (condition) {
return { property };
}
return {};
}
...
request: {
...getProperty()
...
}
// instead of
request: {
property: condition ? property : undefined
}
```
Contributor guide
Assessment
This issue has not been assessed yet.