Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-107206

JS/QML: Support spread operator for objects (ES 9/2018)

    XMLWordPrintable

Details

    Description

      Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#spread_in_object_literals

      Example of such code:

      var foo = { a: 123, b: 456 };
      var bar = { ...foo, c: 678 };
      

      It seems to be supported by chrome and firefox from 2017 and edge from 2020 so there are more and more libs that use the feature, making them harder to integrate with QML.
      Example of such a lib for the sake of having a "complete" repro: https://github.com/tonaljs/tonal

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            jcelerier Jean-Michaƫl Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes