static async createSnapshot(compilation, startTime, dependency) {
    // eslint-disable-next-line consistent-return
    return new Promise((resolve, reject) => {
      compilation.fileSystemInfo.createSnapshot(
        startTime,
        [dependency],
        // @ts-ignore
        // eslint-disable-next-line no-undefined
        undefined,
        // eslint-disable-next-line no-undefined
        undefined,
        null,
        (error, snapshot) => {
          if (error) {
            reject(error);

            return;
          }

          resolve(/** @type {Snapshot} */ (snapshot));
        },
      );
    });
  }
@private
@param {Compilation} compilation
@param {number} startTime
@param {string} dependency
@returns {Promise<Snapshot | undefined>}