code: function Task(func) {
          _super.call(this);
          if (!TypeUtils.isNullOrUndefined(func)) {
              if (typeof func !== "function") {
                  throw "'func' must be a function!";
              }
          }
          this._FUNC = func;
          this.updateStatus(TaskStatus.Created);
      }
docs: Initializes a new instance of that class.
  
  @param {TaskFunc<TState, TResult>} func The function to invoke.