SystemContextRuntimeModule.js 532 B

12345678910111213141516171819202122232425
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. */
  4. "use strict";
  5. const RuntimeGlobals = require("../RuntimeGlobals");
  6. const RuntimeModule = require("../RuntimeModule");
  7. /** @typedef {import("../Compilation")} Compilation */
  8. class SystemContextRuntimeModule extends RuntimeModule {
  9. constructor() {
  10. super("__system_context__");
  11. }
  12. /**
  13. * @returns {string} runtime code
  14. */
  15. generate() {
  16. return `${RuntimeGlobals.systemContext} = __system_context__;`;
  17. }
  18. }
  19. module.exports = SystemContextRuntimeModule;