-
According to the documentation at https://lit.dev/docs/api/controllers/#ReactiveController, the following should be possible: import { ReactiveController } from 'lit'; However, in my vanilla Javascript project this results in a Browser console error message:
I have created a minimal git repository to demo the problem at https://github.com/anneb/lit-import-problem node --version
v18.6.0 What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
ReactiveController
is a type, so it only makes sense for TypeScript. In vanilla JS you'd use "duck-typing", and if/when you use JSDoc to document your code you could import it as@typedef { import("./node_modules/lit/index").ReactiveController } ReactiveController