Add ambient type declarations for the potrace module

This commit is contained in:
Dan committed 2026-06-29 14:10:52 +00:00
1 parent cb80cdfc35
commit 5ec87c4fd5
1 file changed
+8
+8
View File
@@ -0,0 +1,8 @@
// Minimal types for the `potrace` package (no official @types).
declare module "potrace" {
type TraceCallback = (err: Error | null, svg: string) => void;
export function trace(file: Buffer | string, options: Record<string, unknown>, cb: TraceCallback): void;
export function trace(file: Buffer | string, cb: TraceCallback): void;
export function posterize(file: Buffer | string, options: Record<string, unknown>, cb: TraceCallback): void;
export function posterize(file: Buffer | string, cb: TraceCallback): void;
}