-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Return type for beforeLaunch and onPrepare does not make sense #3431
Comments
I did not want to raise a separate issue as I feel this is related. I am trying to use Note: At compile time I do not get any errors, only when I run my scripts i.e.
This is my
The error specified above points an issue at line 3 at
I think there were some changes to the namespace not sure what is causing the issue? |
Yup. This is a problem... I originally had this as |
@igniteram From my investigation, if you import the file, So let's say you do not use onPrepare but you use
|
This is the same other Issue that I mentioned in #3430. (<any> browser).ignoreSynchronization(...) Without importing |
Yup, that could be done too. As long as you do not import browser from 'protractor/globals' before the global variable is set up. |
Didn't get time to comment on this issue, yes I had this feeling that globals were available after import but it would not work somehow, now this clears it up for me and I am using the above work around and its working. I think the imports will change in the coming releases. @cnishina please include unit tests in releases! just kidding 😄 |
I'll have more information on https://github.com/angular/protractor-cookbook Going to close this issue. |
The current solution looks like a hack. Would be great if |
The typings for the lifecycle hooks methods in
protractor/config.ts
should properly andany
orvoid
instead of{}
Example of current typings:
Current workaround needed because of the current typings:
The text was updated successfully, but these errors were encountered: