Lit-element: Typescript error when 'noImplicitAny' in set to TRUE in tsconfig

Created on 10 May 2018  路  2Comments  路  Source: Polymer/lit-element

node_modules/@polymer/lit-element/lit-element.d.ts(14,46): error TS7016: Could not find a declaration file for module '@polymer/polymer/lib/mixins/properties-changed.js'. '/Users/shihn/work/guild/guild-web/node_modules/@polymer/polymer/lib/mixins/properties-changed.js' implicitly has an 'any' type. Trynpm install @types/polymer__polymerif it exists or add a new declaration (.d.ts) file containingdeclare module 'polymer__polymer'; node_modules/@polymer/lit-element/lit-element.d.ts(15,44): error TS7016: Could not find a declaration file for module '@polymer/polymer/lib/mixins/properties-mixin.js'. '/Users/shihn/work/guild/guild-web/node_modules/@polymer/polymer/lib/mixins/properties-mixin.js' implicitly has an 'any' type. Trynpm install @types/polymer__polymerif it exists or add a new declaration (.d.ts) file containingdeclare module 'polymer__polymer'; node_modules/@polymer/lit-element/lit-element.d.ts(17,46): error TS7016: Could not find a declaration file for module '@polymer/polymer/lib/mixins/properties-changed.js'. '/Users/shihn/work/guild/guild-web/node_modules/@polymer/polymer/lib/mixins/properties-changed.js' implicitly has an 'any' type. Trynpm install @types/polymer__polymerif it exists or add a new declaration (.d.ts) file containingdeclare module 'polymer__polymer'; node_modules/@polymer/lit-element/lit-element.d.ts(18,44): error TS7016: Could not find a declaration file for module '@polymer/polymer/lib/mixins/properties-mixin.js'. '/Users/shihn/work/guild/guild-web/node_modules/@polymer/polymer/lib/mixins/properties-mixin.js' implicitly has an 'any' type.

Goes away if noImplicitAny is FALSE. I'd like it to be true in my projects - because typed

All 2 comments

This is actually an issue from the untypedness in Polymer, as the error message explains. Therefore, to be able to resolve this we would need to publish new types for Polymer 3. That is being tracked in https://github.com/Polymer/gen-typescript-declarations/issues/18 which we are working on per https://www.polymer-project.org/blog/2018-01-25-polymer-2-4.html Please subscribe to that issue to be notified when we have resolved it.

I'm not seeing any momentum on the aforementioned issue. Is there any update to the plan?

I'd love to use lit-element but I'm not ready to give up my noImplicitAny :(

Was this page helpful?
0 / 5 - 0 ratings