Fixing nits
This commit is contained in:
@@ -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: [
|
||||
@@ -101,5 +101,3 @@ class Camera {
|
||||
return this.schedule((context) => context.consumeEvents());
|
||||
}
|
||||
}
|
||||
|
||||
export { Camera };
|
||||
|
||||
3
src/libapi.mjs.d.ts
vendored
3
src/libapi.mjs.d.ts
vendored
@@ -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
2
src/types.d.ts
vendored
@@ -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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user