Fixing nits

This commit is contained in:
ICheered
2023-08-05 17:46:08 +02:00
parent b74d938839
commit 83279b5e58
3 changed files with 4 additions and 9 deletions

View File

@@ -31,14 +31,14 @@ const INTERFACE_SUBCLASS = 1; // MTP
let ModulePromise = null;
class Camera {
export class Camera {
constructor() {
this.queue = Promise.resolve();
this.Module = null;
this.context = null;
}
async showCameraPicker() {
static async showPicker() {
// @ts-ignore
await navigator.usb.requestDevice({
filters: [
@@ -100,6 +100,4 @@ class Camera {
async consumeEvents() {
return this.schedule((context) => context.consumeEvents());
}
}
export { Camera };
}

3
src/libapi.mjs.d.ts vendored
View File

@@ -41,9 +41,6 @@ declare interface SupportedOps {
}
declare class Context {
context(): Promise<any> {
throw new Error('Method not implemented.');
}
configToJS(): Promise<Config & { type: 'window' }>;
setConfigValue(
name: string,

2
src/types.d.ts vendored
View File

@@ -4,7 +4,7 @@ import type { Config, Context, SupportedOps } from './libapi.mjs.d.ts';
export declare class Camera {
constructor();
showCameraPicker(): Promise<void>;
static showPicker(): Promise<void>;
connect(): Promise<void>;
disconnect(): Promise<void>;