-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS7016 Could not find a declaration file for module surveyjs-wigets #30
Comments
This sample angular-cli repo also uses surveyjs-widgets package and it builds and runs ok for me. import * as widgets from 'surveyjs-widgets'; Please check this file - https://github.com/surveyjs/surveyjs_angular_cli/blob/master/src/app/survey.component.ts If you are still experiencing the issue please provide us with a steps to reproduce the issue. According to the second question - surveyjs-widgets are using 3rd party JavaScrip libraries and probably some of them don't have typings as well. And this quesion should be asked in the corresponding repository, e.g. here for jQuery datepicker - https://github.com/jquery/jquery-ui |
The problem is that for an environment configured with the following:
If setting noimplicitAny=false, the compile error disappears, but the datepicker element from surveyjs-widgets is not loaded and the following error is returned: I have also tried creating a surveyjs-widgets.d.ts file where to declare the module, where I have included the following: |
It is a difficult problem, a fast solution is create the d.ts file in @types like you do it, but we can declare the next module to allow any types:
about the datepicker, I don't know yet. |
After installing the library, the import is not possible becuase the missing declaration file (.d.ts).
I have attempted to create one in @types, but might happen that it is still wrongly declared, as for instance elements of type "datepicker" are still not visible
Questions:
The text was updated successfully, but these errors were encountered: