import Compiler from "../Compiler/Compiler.js" const Global = (global as any) export const setDefaultCompiler = (name:string,compiler:Compiler)=>{ if(!Global.defaultCompiler)Global.defaultCompiler = {}; const globalCompilers = Global.defaultCompiler as {[key:string]:Compiler} globalCompilers[name] = compiler } export const getDefaultCompiler = (name:string):undefined|Compiler=>{ if(!Global.defaultCompiler)Global.defaultCompiler = {}; const globalCompilers = Global.defaultCompiler as {[key:string]:Compiler} return globalCompilers[name] }