Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79598

Incorrect function signature for YUI Promise.all

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • None
    • 4.1.5, 4.2.2
    • JavaScript

    Description

      YUI's Promise.all is documented to return [Promise], meaning Promise[], when it actually returns a Promise<[]> (Promise of an array instead of array of Promises).

      Sadly, at least IntelliJ, but probably also other IDEs, think we use the yui Promise.all function when we actually use the browsers Promise.all method.

      The actual function signatures of Promise.all in YUI and the browser are equal, but since YUI's is documented incorrectly, at every usage of Promise.all (about fifty times in moodle core), there is a warning similar to "Redundant 'await' for a non-promise type".

      Because of that, it would be nice to have it fixed.

      Attachments

        Issue Links

          Activity

            People

              justusdieckmann Justus Dieckmann
              justusdieckmann Justus Dieckmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.