Vs code > OUTPUT > Prettier
2/23/2020, 12:10:36 PM:
-----------------------
Expression expected. (/Users/yanivper/dev/test/test.ts:2:23)
1 | function test(obj) {
2 | return obj.a?.b;
^
In a new project:
npm i typescript
VScode use Workstation Version 3.8.2 (shown in the left-bottom bar TypeScript 3.8.2 ) Prettier v 2.2.2
In my case I resolve by update prettier from 1.18.2 to 2.0.5.
If someone here is using JetBrains based IDE, please check your prettier settings in IDE, make sure the "Prettier package" is set to right path but not older version path in your global package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With