brepjs API Reference
    Preparing search index...

    Function withScopeResult

    • Run fn inside a DisposalScope. The scope is disposed on all exit paths: Ok return, Err return, and throw. Use in any function that allocates kernel objects and returns Result.

      return withScopeResult((scope) => {
      const axis = scope.register(makeKernelAx1(origin, dir));
      return ok(castShape(getKernel().makeSomething(axis)) as Solid);
      });

      Type Parameters

      Parameters

      Returns Result<T, E>