NullFactory.js 628 B

1234567891011121314151617181920212223
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const ModuleFactory = require("./ModuleFactory");
  7. /** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
  8. /** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */
  9. class NullFactory extends ModuleFactory {
  10. /**
  11. * @param {ModuleFactoryCreateData} data data object
  12. * @param {function(Error=, ModuleFactoryResult=): void} callback callback
  13. * @returns {void}
  14. */
  15. create(data, callback) {
  16. return callback();
  17. }
  18. }
  19. module.exports = NullFactory;