Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5496

Optional chaining (?.) support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.3, 13
    • None
    • None

    Description

      Optional chaining is supported by all major browsers. Please add support for it in Netbeans.

      Currently NB shows "Expected operand" error and other things might brake in the file too.

      Example:

      class TestClass {
      	getValue() {
      		return null;
      	}
      	getSubmitValue() {
      		return this.getValue()?.join(',');
      	}
      }

      See also:
      https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

       

      In NB 12.3:

      Attachments

        1. error.jpg
          32 kB
          PetitBoeuf
        2. image-2021-03-25-15-33-58-344.png
          11 kB
          Maciej Jaros

        Activity

          People

            Unassigned Unassigned
            eccenux Maciej Jaros
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: