-
-
Notifications
You must be signed in to change notification settings - Fork 576
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
Compilation errors in typescript type definition? #425
Comments
which version of typescript and jquery lib and @types do you use? Do you have this project somewhere where I can check? |
Typescript: 2.9.2 I don't have any @types for jquery.terminal installed. I get the above errors just from installing the new version of the package and importing it in my typescript file. |
from version 1.19.0 the package include typings, maybe there is something in your code, do you use any |
do you have |
If you have |
I updated the @types/jquery to the most recent version, and now everything is good. Thanks! (btw, it seems like the greetings property is missing from the TerminalOptions type?) |
prompt was a bug it should be:
I thought that |
I thought that typescript d.ts file is complete but it still need work like echo value can be string, array of strings or function that return string or array and any promise that is passed to echo like the one in prompt can resolve to the same value. so if fact this should be
|
@jcubic So right now keeping the type definition up to date is a seperate task, which is hard to verify besides having a complete usage example to build? Is the only way to avoid this, to rewrite everything in typescript (seems like an enormous task, but would it actually? since it could start out with exactly what you have now, and then types could be added along the way. Anyway, just throwing it out there.), or is there other preferably automated way to verify the types against the library? Anyway, I will keep this in mind and see if I can contribute to the type definitions at some point. |
I will add typescript as dev dependency and I will run tsc on test.ts file on build, that will be compete api usage in one file, it will not be that big, spec file ( |
I've updated d.ts file with after adding test for all related to terminal, cmd still need testing. |
Version 1.22.0 with updated d.ts file just got released. |
Expected behavior
That everything compiles in my angular 6 application.
Actual behavior
I get the following error after upgrading from v1.12.1 to v1.21.0
ERROR in node_modules/jquery.terminal/js/jquery.terminal.d.ts(324,54): error TS2344: Type 'TElement' does not satisfy the constraint 'Node'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(363,38): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(364,42): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(439,65): error TS2344: Type 'TElement' does not satisfy the constraint 'Node'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(465,41): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(467,38): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(487,38): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(488,42): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(500,38): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'. node_modules/jquery.terminal/js/jquery.terminal.d.ts(501,42): error TS2344: Type 'TElement' does not satisfy the constraint 'EventTarget'.
Browser and OS
Angular CLI: 6.1.3
Node: 8.11.3
OS: darwin x64
Angular: 6.1.1
The text was updated successfully, but these errors were encountered: