export declare type Coord = { x: number; y: number; }; export declare type Rgb = { r: number; g: number; b: number; }; export interface ISpriteSheet { has(character: string): boolean; get(character: string): PixelDefinition; } export interface PixelDefinition extends SpriteSheetMetadata { character: string; spriteSheetOffset: number; } export interface SpriteSheetMetadata { index: number; width: number; } export interface BluetoothScanFilters { name: string | null; namePrefix?: string; } export interface RequestDeviceOptions { filters: BluetoothScanFilters[]; optionalServices: number[]; acceptAllDevices?: boolean; } export interface Bluetooth { getAvailability(): Promise; onavailabilitychanged: CallableFunction; readonly referringDevice: BluetoothDevice; getDevices(): Promise; requestDevice(options: RequestDeviceOptions): Promise; } export interface BluetoothDevice { readonly id: string; readonly name?: string | null; readonly gatt?: BluetoothRemoteGATTServer | null; readonly uuids: string[]; readonly watchingAdvertisements: boolean; watchAdvertisements(): Promise; unwatchAdvertisements(): Promise; } export interface BluetoothRemoteGATTService { readonly uuid: string; readonly isPrimary: boolean; readonly device: BluetoothDevice; getCharacteristic(characteristic: string): Promise; getCharacteristics(characteristic?: string | null): Promise; getIncludedService(service: string): Promise; getIncludedServices(service?: string | null): Promise; } export interface BluetoothRemoteGATTServer { readonly device: BluetoothDevice; readonly connected: boolean; connect(): Promise; disconnect(): void; getPrimaryService(service: number): Promise; getPrimaryServices(service?: number | null): Promise; } export interface BluetoothRemoteGATTCharacteristic { readonly uuid: string; readonly service: any; readonly properties: any; readonly DataView: any; getDescriptor(descriptor: any): Promise; getDescriptors(descriptor: any): Promise; readValue(): Promise; writeValue(value: BufferSource): Promise; startNotifications(): Promise; stopNotifications(): Promise; } export declare type BluetoothGATTCharacteristic = BluetoothRemoteGATTCharacteristic; export declare type BluetoothGATTService = BluetoothRemoteGATTService;