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; +}