Skip to content
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 4.8.2: type error #4071

Closed
2 tasks done
jlowcs opened this issue Aug 30, 2022 · 1 comment
Closed
2 tasks done

TypeScript 4.8.2: type error #4071

jlowcs opened this issue Aug 30, 2022 · 1 comment
Labels

Comments

@jlowcs
Copy link

jlowcs commented Aug 30, 2022

Initial checklist

  • 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

Simply try to compile the types with TypeScript 4.8.2

Expected behavior

Types should compile

Actual behavior

These errors are reported:

node_modules/@uppy/core/types/index.d.ts:25:12 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

25   UppyFile<TMeta, TBody>,
              ~~~~~

  node_modules/@uppy/core/types/index.d.ts:24:26
    24 type UppyFileWithoutMeta<TMeta, TBody> = OmitKey<
                                ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:39:66 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

39 export interface UploadedUppyFile<TMeta, TBody> extends UppyFile<TMeta, TBody> {
                                                                    ~~~~~

  node_modules/@uppy/core/types/index.d.ts:39:35
    39 export interface UploadedUppyFile<TMeta, TBody> extends UppyFile<TMeta, TBody> {
                                         ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:43:64 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

43 export interface FailedUppyFile<TMeta, TBody> extends UppyFile<TMeta, TBody> {
                                                                  ~~~~~

  node_modules/@uppy/core/types/index.d.ts:43:33
    43 export interface FailedUppyFile<TMeta, TBody> extends UppyFile<TMeta, TBody> {
                                       ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:207:56 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

207 export type FileAddedCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                           ~~~~~

  node_modules/@uppy/core/types/index.d.ts:207:31
    207 export type FileAddedCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                      ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:208:58 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

208 export type FilesAddedCallback<TMeta> = (files: UppyFile<TMeta>[]) => void;
                                                             ~~~~~

  node_modules/@uppy/core/types/index.d.ts:208:32
    208 export type FilesAddedCallback<TMeta> = (files: UppyFile<TMeta>[]) => void;
                                       ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:209:58 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

209 export type FileRemovedCallback<TMeta> = (file: UppyFile<TMeta>, reason: FileRemoveReason) => void;
                                                             ~~~~~

  node_modules/@uppy/core/types/index.d.ts:209:33
    209 export type FileRemovedCallback<TMeta> = (file: UppyFile<TMeta>, reason: FileRemoveReason) => void;
                                        ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:212:65 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

212 export type PreProcessCompleteCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                                    ~~~~~

  node_modules/@uppy/core/types/index.d.ts:212:40
    212 export type PreProcessCompleteCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                               ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:213:61 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

213 export type UploadProgressCallback<TMeta> = (file: UppyFile<TMeta>, progress: FileProgress) => void;
                                                                ~~~~~

  node_modules/@uppy/core/types/index.d.ts:213:36
    213 export type UploadProgressCallback<TMeta> = (file: UppyFile<TMeta>, progress: FileProgress) => void;
                                           ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:214:60 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

214 export type UploadSuccessCallback<TMeta> = (file: UppyFile<TMeta>, response: SuccessResponse) => void
                                                               ~~~~~

  node_modules/@uppy/core/types/index.d.ts:214:35
    214 export type UploadSuccessCallback<TMeta> = (file: UppyFile<TMeta>, response: SuccessResponse) => void
                                          ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:215:67 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

215 export type UploadCompleteCallback<TMeta> = (result: UploadResult<TMeta>) => void
                                                                      ~~~~~

  node_modules/@uppy/core/types/index.d.ts:215:36
    215 export type UploadCompleteCallback<TMeta> = (result: UploadResult<TMeta>) => void
                                           ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:217:58 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

217 export type UploadErrorCallback<TMeta> = (file: UppyFile<TMeta>, error: Error, response?: ErrorResponse) => void;
                                                             ~~~~~

  node_modules/@uppy/core/types/index.d.ts:217:33
    217 export type UploadErrorCallback<TMeta> = (file: UppyFile<TMeta>, error: Error, response?: ErrorResponse) => void;
                                        ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:222:64 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

222 export type RestrictionFailedCallback<TMeta> = (file: UppyFile<TMeta> | undefined, error: Error) => void;
                                                                   ~~~~~

  node_modules/@uppy/core/types/index.d.ts:222:39
    222 export type RestrictionFailedCallback<TMeta> = (file: UppyFile<TMeta> | undefined, error: Error) => void;
                                              ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/core/types/index.d.ts:356:57 - error TS2344: Type 'TOptions' does not satisfy the constraint 'PluginOptions'.

356   use<TOptions, TInstance extends UIPlugin | BasePlugin<TOptions>>(
                                                            ~~~~~~~~

  node_modules/@uppy/core/types/index.d.ts:356:7
    356   use<TOptions, TInstance extends UIPlugin | BasePlugin<TOptions>>(
              ~~~~~~~~
    This type parameter might need an `extends PluginOptions` constraint.

node_modules/@uppy/dashboard/types/index.d.ts:87:69 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

87 export type DashboardFileEditStartCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                                       ~~~~~

  node_modules/@uppy/dashboard/types/index.d.ts:87:44
    87 export type DashboardFileEditStartCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                  ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/dashboard/types/index.d.ts:88:72 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

88 export type DashboardFileEditCompleteCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                                          ~~~~~

  node_modules/@uppy/dashboard/types/index.d.ts:88:47
    88 export type DashboardFileEditCompleteCallback<TMeta> = (file: UppyFile<TMeta>) => void;
                                                     ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.

node_modules/@uppy/thumbnail-generator/types/index.d.ts:24:18 - error TS2344: Type 'TMeta' does not satisfy the constraint 'IndexedObject<any>'.

24   file: UppyFile<TMeta>,
                    ~~~~~

  node_modules/@uppy/thumbnail-generator/types/index.d.ts:23:40
    23 export type ThumbnailGeneratedCallback<TMeta> = (
                                              ~~~~~
    This type parameter might need an `extends IndexedObject<any>` constraint.
@jlowcs
Copy link
Author

jlowcs commented Aug 30, 2022

Never mind, it was just fixed today in here

@jlowcs jlowcs closed this as completed Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant