Uppy: TS2315: Type '...' is not generic

Created on 28 Mar 2020  路  5Comments  路  Source: transloadit/uppy

After upgrading: @uppy/xhr-upload from 1.4.1 to 1.5.3

I start getting this error:

ERROR in [at-loader] ./node_modules/@uppy/xhr-upload/types/generatedLocale.d.ts:3:24 
    TS2315: Type 'Locale' is not generic.

ERROR in [at-loader] ./node_modules/@uppy/xhr-upload/types/index.d.ts:20:33 
    TS2315: Type 'Plugin' is not generic.

I tried the versions listed at https://www.npmjs.com/package/@uppy/xhr-upload

Looks like this happens after upgrading from 1.5.1 to 15.2. i.e. still works for me in 1.5.1 but breaks with that error in 1.5.2.

This is happening when using WebPack and obviously Typescript.

Bug Types

All 5 comments

Which @uppy/core version are you using?

"@uppy/core": "1.7.0",

@guyellis could you try with the latest @uppy/[email protected]?

Ahh, so it ended up being a slight breaking change after all :/ The typings for plugins changed in @uppy/[email protected]. It was supposed to be an internal-only change, but newer versions of plugins ended up requiring a newer version of @uppy/core. Sorry for the trouble!

Using the latest of all the @uppy/ modules fixed it. Not sure why I hadn't updated core...

Was this page helpful?
0 / 5 - 0 ratings