UNPKG

515 BTypeScriptView Raw
1/// <reference types="offscreencanvas" />
2import { Syringe } from 'mana-syringe';
3export declare const ContextService: Syringe.DefinedToken;
4export interface ContextService<Context> {
5 init: () => void;
6 destroy: () => void;
7 getContext: () => Context | null;
8 getDomElement: () => HTMLElement | OffscreenCanvas | null;
9 getDPR: () => number;
10 getBoundingClientRect: () => DOMRect | undefined;
11 resize: (width: number, height: number) => void;
12 applyCursorStyle: (cursor: string) => void;
13}