function createProgramInfoAsync(gl, shaders) {
  for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
    args[_key3 - 2] = arguments[_key3];
  }

  return new Promise(function (resolve, reject) {
    var programOptions = getProgramOptions.apply(void 0, args);

    programOptions.callback = function (err, programInfo) {
      if (err) {
        reject(err);
      } else {
        resolve(programInfo);
      }
    };

    createProgramInfo(gl, shaders, programOptions);
  });
}
Same as createProgramInfo but returns a promise
@param {WebGLRenderingContext} gl The WebGLRenderingContext
       to use.
@param {string[]} shaderSources Array of sources for the
       shaders or ids. The first is assumed to be the vertex shader,
       the second the fragment shader.
@param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
@param {number[]} [opt_locations|module:twgl.ErrorCallback] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
@param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
       on error. If you want something else pass an callback. It's passed an error message.
@return {Promise<module:twgl.ProgramInfo>} The created ProgramInfo
@memberOf module:twgl/programs