loadTfModule function ✓ 100.0%
Last updated: 2026-03-02T11:04:51.015Z
Metrics
LOC: 9
Complexity: 3
Params: 0
Coverage: 100.0% (6/6 lines, 5x executed)
Signature
loadTfModule(): : Promise<typeof import("@tensorflow/tfjs")>
Source Code
async function loadTfModule(): Promise<typeof import("@tensorflow/tfjs")> {
if (_tfModule) return _tfModule;
if (_tfLoadPromise) return _tfLoadPromise;
_tfLoadPromise = import("@tensorflow/tfjs").then((mod) => {
_tfModule = mod;
return mod;
});
return _tfLoadPromise;
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| loadPretrainedModel | calls |