You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
759 B

4 years ago
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const DependencyReference = require("./DependencyReference");
  7. const ModuleDependency = require("./ModuleDependency");
  8. class WebAssemblyExportImportedDependency extends ModuleDependency {
  9. constructor(exportName, request, name, valueType) {
  10. super(request);
  11. /** @type {string} */
  12. this.exportName = exportName;
  13. /** @type {string} */
  14. this.name = name;
  15. /** @type {string} */
  16. this.valueType = valueType;
  17. }
  18. getReference() {
  19. if (!this.module) return null;
  20. return new DependencyReference(this.module, [this.name], false);
  21. }
  22. get type() {
  23. return "wasm export import";
  24. }
  25. }
  26. module.exports = WebAssemblyExportImportedDependency;