import assert from "node:assert" ; import { ReadonlyDeep , } from "type-fest" ; import Camera , { UvcControl , } from "uvc-control" ; import CameraControlHelperClass from "./camera-control-helper.js" ; export default class CameraControlHelperFactory { constructor ( private readonly UvcControl , private readonly CameraControlHelper ) { assert . strictEqual ( arguments . length , 2 ) ; assert ( typeof this . UvcControl === "function" ) ; assert ( typeof this . CameraControlHelper === "function" ) ; } async get ( camera ) { assert . strictEqual ( arguments . length , 1 ) ; assert ( typeof camera === "object" ) ; const cameraControlHelper = new this . CameraControlHelper ( this . UvcControl , camera ) ; return cameraControlHelper ; } }