I have a project that contains polymer@next as yarn module, added it as a pure JS library.. I wanted to use the typings from the types folder from the polymer 2.4 github repo found here: https://github.com/Polymer/polymer/tree/2.4-pre/types
So I went off creating a @types folder and adding a @polymer folder in it with a package.json and index.d.ts and all of the files from the repo.
No matter what I try, tsc does not find and accept the polymer-element typings.. It is in the @types folder as a file in the polymer...
The structure of my @typings contains:
+ @types
++++ @polymer
------ package.json
------ index.d.ts
------ polymer-element.d.ts
My code (app.ts) contains: import { Element } from '@polymer/polymer/polymer-element'
I also tried to place the 'polymer-element.d.ts' in a 'polymer' subfolder, but this also produces the same error:
src/myapp.ts(3,25): error TS7016: Could not find a declaration file for
module '@polymer/polymer/polymer-element'.
'/Users/johngorter/Desktop/polymernext/node_modules/@polymer/polymer/polymer-element.js' implicitly has an 'any' type.
Try `npm install @types/@polymer/polymer/polymer-element` if it exists or add a new declaration (.d.ts) file containing `declare module '@polymer/polymer/polymer-element';`
What am I missing here? Why is tsc --traceResolution not giving me the right insights?
Thanx John.