0

When I save the file vscode auto scrolls to this random line and points to the . giving this error. I just check if dateToComplete is null because sometimes it needs to be, do I need to disable some new feature from ts?

if (this.editMode || !this.dateToComplete?.pristine)

Here is full Output tab warning or whatever is it.

    Expression expected. (90:46)
  88 |   selectDate(d: any) {
  89 |      if (d) {
> 90 |          if (this.editMode || !this.dateToComplete?.pristine)
     |                                                    ^
  91 |              this.selectedDate = moment(d, 'YYYY-MM-DD').toDate();
  92 |      }
  93 |  }

Any help appreciated, if is a duplicate question I just didn't find it but you can point me out.

Eduard
  • 732
  • 1
  • 7
  • 20
  • 2
    See if this helps: https://stackoverflow.com/q/54611471/6513921 – ruth Feb 24 '22 at 09:32
  • Kinda not really, I am on `"typescript": "~4.5.2"` while they weren't even on 3.7, but at least I know how to google this problem, thank you very much – Eduard Feb 24 '22 at 09:39
  • I had enabled Prettier Now and Prettier EsLint, I removed both and just enabled the Prettier with the most reviews, probably I played with them in some late night and forgot them enabled and now it throws this random warning. I also updated typescript version in the process. So the text in Output might be misleading, its more important the dropdown in the right in the Output console and it says who throws that warning. – Eduard Feb 24 '22 at 10:00

0 Answers0