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
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'.
The latest update introduces [Constructible Stylesheets][cs-url] via
`static get styles()`. All codes have been refactored to use that for
declaring styles with shareable styles. However this blocks TS
compilation due to unsupported types of the new API which has yet to be
implemented into browsers except being enabled by default in latest
Chrome Canary 73. To learn more about the issue, please visit
lit/lit-element#428.
[cs-url]: https://www.chromestatus.com/feature/5394843094220800
Latest `lit-element` has fixed a known issue where missing types are not
exported thus breaks TS compilation for many users. To learn more about
the issue, please visit lit/lit-element#428.
`@material/mwc-button` has been updated to latest `lit-element` too.
Reinstalled to make the buttons work again!
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.ts
Live 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
The text was updated successfully, but these errors were encountered: