-
Notifications
You must be signed in to change notification settings - Fork 322
fix(types): add ProviderDefaults to fix provider type resolution #2056
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,17 +29,13 @@ describe('image helper', () => { | |
| provider: 'ipx', | ||
| modifiers: { | ||
| sharpen: 0.75, | ||
| // @ts-expect-error this is not a valid modifier for ipx | ||
| alkj: false, | ||
|
Comment on lines
-32
to
-33
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a correct test to make sure that modifiers are typed correctly (in other words, you can't pass a nonsense modifier to them) we wouldn't want to get rid of this test
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've reverted the @ts-expect-error removal. I now understand this is a valid test to ensure invalid modifiers are caught by the type system. |
||
| }, | ||
| }) | ||
|
|
||
| // defaults to ipx as default provider | ||
| useImage().getImage('/test.png', { | ||
| modifiers: { | ||
| sharpen: 0.75, | ||
| // @ts-expect-error this is not a valid modifier for ipx | ||
| alkj: false, | ||
| }, | ||
| }) | ||
| }) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is a correct fix - this file is only used when developing nuxt/image and is not included in the dist files... it won't make any difference to the experience of an end user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct that this file isn't included in the dist, so it wouldn't help end users.