12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- "use strict";
- const Generator = require("../Generator");
- const { WEBASSEMBLY_TYPES } = require("../ModuleSourceTypesConstants");
- class AsyncWebAssemblyGenerator extends Generator {
-
- constructor(options) {
- super();
- this.options = options;
- }
-
- getTypes(module) {
- return WEBASSEMBLY_TYPES;
- }
-
- getSize(module, type) {
- const originalSource = module.originalSource();
- if (!originalSource) {
- return 0;
- }
- return originalSource.size();
- }
-
- generate(module, generateContext) {
- return (module.originalSource());
- }
- }
- module.exports = AsyncWebAssemblyGenerator;
|