From 5ec87c4fd5bcd042d5be6547276811a85cfccad6 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 29 Jun 2026 14:10:52 +0000 Subject: [PATCH] Add ambient type declarations for the potrace module --- src/types/potrace.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/types/potrace.d.ts diff --git a/src/types/potrace.d.ts b/src/types/potrace.d.ts new file mode 100644 index 0000000..2ee1ef9 --- /dev/null +++ b/src/types/potrace.d.ts @@ -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, cb: TraceCallback): void; + export function trace(file: Buffer | string, cb: TraceCallback): void; + export function posterize(file: Buffer | string, options: Record, cb: TraceCallback): void; + export function posterize(file: Buffer | string, cb: TraceCallback): void; +}