MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / buildMinimalLualibBundle

Function buildMinimalLualibBundle

src/LuaLib.ts:280–290  ·  view source on GitHub ↗
(
    features: Iterable<LuaLibFeature>,
    luaTarget: LuaTarget,
    emitHost: EmitHost
)

Source from the content-addressed store, hash-verified

278}
279
280export function buildMinimalLualibBundle(
281 features: Iterable<LuaLibFeature>,
282 luaTarget: LuaTarget,
283 emitHost: EmitHost
284): string {
285 const code = loadInlineLualibFeatures(features, luaTarget, emitHost);
286 const moduleInfo = getLuaLibModulesInfo(luaTarget, emitHost);
287 const exports = Array.from(features).flatMap(feature => moduleInfo[feature].exports);
288
289 return code + getLualibBundleReturn(exports);
290}
291
292export function findUsedLualibFeatures(
293 luaTarget: LuaTarget,

Callers 1

Calls 3

loadInlineLualibFeaturesFunction · 0.85
getLuaLibModulesInfoFunction · 0.85
getLualibBundleReturnFunction · 0.85

Tested by

no test coverage detected