fix: Fixed example in README.md #742
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
(not sure if bug-report is appropriate for a bug in documentation)
I was trying to copy-paste an example from README.md, and it resulted in compilation errors
Minimal code-snippet showcasing the problem
Expected behavior
There shouldn't be a compilation when copy-pasting the example
Actual behavior
There is a compilation error. This is because JS/TS parser thinks that this is a normal lambda ( eg
() => { ... console.log and etc ... }
), with labels inserted in weird places.Most likely the intent was to return an object instead. To do so, this "code-block" must be incapsulated in (), eg
() => ({ object: true })
.The text was updated successfully, but these errors were encountered: