You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a bug report and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Link to runnable example
No response
Steps to reproduce
Install latest Uppy packages
Instantiate Uppy and add GooglePhotosPicker using boilerplate code as follows:
importGooglePhotosPickerfrom'@uppy/google-photos-picker';import{COMPANION_URL,COMPANION_ALLOWED_HOSTS}from'@uppy/transloadit';
...
.use(GooglePhotosPicker,{companionUrl: COMPANION_URL,companionAllowedHosts: COMPANION_ALLOWED_HOSTS,clientId: 'From Google Developer Console',})
Encountered while using Typescript 5.4.5, tried upgrading to 5.7.2 with no change in behavior
Expected behavior
No Typescript errors
Actual behavior
Typescript error:
Argument of type 'typeof GooglePhotosPicker' is not assignable to parameter of type '{ new (uppy: Uppy<Meta, Record<string, never>>, opts?: any): BasePlugin<any, Meta, Record<string, never>, Record<string, unknown>>; prototype: BasePlugin<...>; }'.
Types of construct signatures are incompatible.
Type 'new <M extends Meta & { width: number; height: number; }, B extends Body>(uppy: Uppy<M, B>, opts: GooglePhotosPickerOptions) => GooglePhotosPicker<M, B>' is not assignable to type 'new (uppy: Uppy<Meta, Record<string, never>>, opts?: any) => BasePlugin<any, Meta, Record<string, never>, Record<string, unknown>>'.
Types of parameters 'uppy' and 'uppy' are incompatible.
Type 'Uppy<Meta, Record<string, never>>' is not assignable to type 'Uppy<Meta & { width: number; height: number; }, Record<string, never>>'.
The types of 'opts.meta' are incompatible between these types.
Type 'Meta' is not assignable to type 'Meta & { width: number; height: number; }'.
Type 'Meta' is missing the following properties from type '{ width: number; height: number; }': width, height ts(2345)
GooglePhotosPicker extends Meta to require width and height:
Initial checklist
Link to runnable example
No response
Steps to reproduce
Encountered while using Typescript 5.4.5, tried upgrading to 5.7.2 with no change in behavior
Expected behavior
No Typescript errors
Actual behavior
Typescript error:
GooglePhotosPicker
extendsMeta
to requirewidth
andheight
:Found someone in community forum reporting this too (not me) but there's been no discussion there: https://community.transloadit.com/t/googlephotospicker-ts-error/17382
The text was updated successfully, but these errors were encountered: