brepjs API Reference
    Preparing search index...

    Function withKernel

    brepjs — Public API

    • Run a synchronous function with a specific kernel as the default, then restore the previous default.

      Warning: Do NOT pass an async function — the kernel override is restored synchronously in finally, so any getKernel() call after the first await inside fn would observe the wrong kernel.

      Type Parameters

      • T extends unknown

      Parameters

      • id: string
      • fn: () => T

      Returns T