-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript types for @squoosh/lib #1077
Comments
Yeah, we don’t have full types for libSquoosh yet, only for some of the files. It’s an incremental migration that @ergunsh is working on :) |
Bump, trying to use this to replace imagemin with TypeScript, but it doesn't have types so I can't even IntelliSense what options/properties are available. |
That’s more a question of documentation than TypeScript tbh. Feel free to take a look at the options object in |
Having a list of properties/arguments (that work with IntelliSense) and their types is sorta documention, but also one of the purposes of TS. Some even go as far as adding a description to everything, making it even more like a built-in documentation. Linking to that specific object does help way more than what's currently in the docs though. |
Yeah, we know documentation is a weak point and we are working on that. Fwiw, we do link to |
@ergunsh Thoughts on this one? I think we can do something like |
Totally @styfle! :) I was a bit skeptical to expose the types before improving the type definitions for So, I created a PR to add the parameter types to those #1141 and created another PR to expose the types #1142 |
I am trying to use
Typescript
to use@squoosh/lib
but getting the usual error when no types are available:Are there are no types included for this library or could I doing something wrong?
Currently using
as a workaround.
The text was updated successfully, but these errors were encountered: