import type Canvas from "canvas"; type Factory = { canvas: Canvas.Canvas | null; context: Canvas.CanvasRenderingContext2D | null; }; type NonNullableFactory = { [K in keyof Factory]: NonNullable; }; export interface CanvasFactory { create(width: number, height: number, transparent: boolean): NonNullableFactory; } export {};