LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
When I use decorators of LitElement, TypeScript compiler emits errors.
ERROR in [at-loader] ./node_modules/@polymer/lit-element/lib/decorators.d.ts:37:105
TS2304: Cannot find name 'ClassDescriptor'.
ERROR in [at-loader] ./node_modules/@polymer/lit-element/lib/decorators.d.ts:43:118
TS2304: Cannot find name 'ClassElement'.
ERROR in [at-loader] ./node_modules/@polymer/lit-element/lib/decorators.d.ts:48:80
TS2304: Cannot find name 'ClassElement'.
ERROR in [at-loader] ./node_modules/@polymer/lit-element/lib/decorators.d.ts:53:83
TS2304: Cannot find name 'ClassElement'.
Description
When I use decorators of LitElement, TypeScript compiler emits errors.
It looks a bug.
env.d.ts
is only accessible from LitElement source code. https://github.com/Polymer/lit-element/blob/master/src/env.d.tsLive Demo
https://stackblitz.com/edit/lit-element-example?file=index.js
https://glitch.com/edit/#!/hello-lit-element?path=index.html:1:0
Steps to Reproduce
@property()
in TypeScripttsc
Expected Results
No errors.
Actual Results
Error is thrown
Browsers Affected
Versions