svg / svgo

⚙️ Node.js tool for optimizing SVG files
https://svgo.dev/
MIT License
21.03k stars 1.39k forks source link

`optimize` types missing from svgo-node.d.ts in 4.0.0-rc.1 #2078

Open bschlenk opened 1 month ago

bschlenk commented 1 month ago

Describe the bug I'm using 4.0.0-rc.1 to get around a bug in v3, but types are missing for the optimize function. I'm currently working around it by doing

// @ts-expect-error
import { optimize } from 'svgo'

but it'd be nice to have types here!

To Reproduce Steps to reproduce the behavior:

  1. install svgo@4.0.0-rc.1 in a typescript project
  2. try to do import { optimize } from 'svgo'
  3. notice typescript complains

Expected behavior I'd expect types to exist for svgo's core function.

Screenshots

Screenshot 2024-09-29 at 21 42 09

Desktop (please complete the following information):