file-drop icon indicating copy to clipboard operation
file-drop copied to clipboard

Cannot find name 'HTMLAttributes'

Open batbrain9392 opened this issue 5 years ago • 1 comments

While using this wc in Angular, I am getting the following error on running ng serve --aot : ERROR in node_modules/file-drop-element/dist/filedrop.d.ts(32,46): error TS2304: Cannot find name 'HTMLAttributes'.

Steps to reproduce the issue:

  1. Create angular project with the cli (ng new dummyProject)
  2. Install and add wc polyfill (import '@webcomponents/webcomponentsjs/webcomponents-loader.js';)
  3. Update tsconfig.json to allow js ("allowJs": true,)
  4. Add schemas: [CUSTOM_ELEMENTS_SCHEMA] in AppModule
  5. Import the file-drop wc in AppModule (import 'file-drop-element';)

@PaulKinlan

batbrain9392 avatar Jun 19 '19 12:06 batbrain9392

Yep - the HTML Attributes was a preact thing, I am not sure how Angular deals with TypeScript, but I would be happy to add support.

PaulKinlan avatar Jul 04 '19 02:07 PaulKinlan