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)

graph LR loadTfModule["loadTfModule"] loadPretrainedModel["loadPretrainedModel"] loadPretrainedModel -->|calls| loadTfModule style loadTfModule fill:#dbeafe,stroke:#2563eb,stroke-width:2px click loadTfModule "0aaf7f2a78a8a2ae.html" click loadPretrainedModel "5945d42bd468f616.html"
SourceType
loadPretrainedModel calls