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
In an attempt to create a custom Dashboard plugin using Typescript, the mount method requires passing this as the second parameter. However, I receive the following error:
Argument of type 'this' is not assignable to parameter of type 'typeof UIPlugin'.
Property 'prototype' is missing in type 'UppyDashboardPlugin' but required in type 'typeof UIPlugin'.
My class is essentially a barebones Dashboard react component taken from the @uppy/react library, but just in Typescript:
Also just FYI, the documentation states that you only need to pass a target with mount, but the typings in Typescript require two args. (target and the this of the class): https://uppy.io/docs/writing-plugins/#BasePlugin
In an attempt to create a custom Dashboard plugin using Typescript, the
mount
method requires passingthis
as the second parameter. However, I receive the following error:My class is essentially a barebones
Dashboard
react component taken from the@uppy/react
library, but just in Typescript:Also just FYI, the documentation states that you only need to pass a
target
withmount
, but the typings in Typescript require two args. (target and thethis
of the class): https://uppy.io/docs/writing-plugins/#BasePluginEDIT:
Here's a codesandbox reproduction: https://codesandbox.io/s/fancy-lake-bovb0t?file=/src/Dashboard.tsx
The text was updated successfully, but these errors were encountered: