(
luaTarget: LuaTarget,
emitHost: EmitHost
)
| 156 | const lualibExportToFeature = new Map<LuaTarget, ReadonlyMap<string, LuaLibFeature>>(); |
| 157 | |
| 158 | export function getLuaLibExportToFeatureMap( |
| 159 | luaTarget: LuaTarget, |
| 160 | emitHost: EmitHost |
| 161 | ): ReadonlyMap<string, LuaLibFeature> { |
| 162 | if (!lualibExportToFeature.has(luaTarget)) { |
| 163 | const luaLibModulesInfo = getLuaLibModulesInfo(luaTarget, emitHost); |
| 164 | const map = new Map<string, LuaLibFeature>(); |
| 165 | for (const [feature, info] of Object.entries(luaLibModulesInfo)) { |
| 166 | for (const exportName of info.exports) { |
| 167 | map.set(exportName, feature as LuaLibFeature); |
| 168 | } |
| 169 | } |
| 170 | lualibExportToFeature.set(luaTarget, map); |
| 171 | } |
| 172 | |
| 173 | return lualibExportToFeature.get(luaTarget)!; |
| 174 | } |
| 175 | |
| 176 | const lualibFeatureCache = new Map<LuaTarget, Map<LuaLibFeature, string>>(); |
| 177 |
no test coverage detected