question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tyedefs: 'AbstractExtendedWebDriver' incorrectly extends interface 'ExtendedWebDriver'

See original GitHub issue

Bug report

  • Node Version: 7.9.0
  • Protractor Version: 5.1.2
  • Operating System and Version Windows 10

I recently upgrade a project from Typescript 2.3.x to 2.4.1 and now I get this error TS2430 about the typedefs in \node_modules\protractor\built\browser.d.ts

Interface ‘AbstractExtendedWebDriver’ incorrectly extends interface ‘ExtendedWebDriver’

  Types of property 'controlFlow' are incompatible.
    Type '() => promise.ControlFlow' is not assignable to type '() => promise.ControlFlow'. Two different types with this name exist, but they are unrelated.
      Type 'promise.ControlFlow' is not assignable to type 'promise.ControlFlow'. Two different types with this name exist, but they are unrelated.
        Types of property 'execute' are incompatible.
          Type '<T>(fn: () => T | promise.Promise<T>, opt_description?: string | undefined) => promise.Promise<T>' is not assignable to type '<T>(fn: () => T | promise.Promise<T>, opt_description?: string | undefined) => promise.Promise<T>'. Two different types with this name exist, but they are unrelated.
            Types of parameters 'fn' and 'fn' are incompatible.
              Type 'T | promise.Promise<T>' is not assignable to type 'T | promise.Promise<T>'. Two different types with this name exist, but they are unrelated.
                Type 'Promise<T>' is not assignable to type 'T | Promise<T>'.
                  Type 'promise.Promise<T>' is not assignable to type 'promise.Promise<T>'. Two different types with this name exist, but they are unrelated.
                    Types of property 'then' are incompatible.
                      Type '<R>(opt_callback?: ((value: T) => R | promise.IThenable<R>) | undefined, opt_errback?: ((error: a...' is not assignable to type '<R>(opt_callback?: ((value: T) => R | promise.IThenable<R>) | undefined, opt_errback?: ((error: a...'. Two different types with this name exist, but they are unrelated.
                        Types of parameters 'opt_callback' and 'opt_callback' are incompatible.
                          Type 'R | promise.IThenable<R>' is not assignable to type 'R | promise.IThenable<R>'. Two different types with this name exist, but they are unrelated.
                            Type 'IThenable<R>' is not assignable to type 'R | IThenable<R>'.
                              Type 'promise.IThenable<R>' is not assignable to type 'promise.IThenable<R>'. Two different types with this name exist, but they are unrelated.
                                Types of property 'then' are incompatible.
                                  Type '<R>(opt_callback?: ((value: R) => R | promise.IThenable<R>) | undefined, opt_errback?: ((error: a...' is not assignable to type '<R>(opt_callback?: ((value: R) => R | promise.IThenable<R>) | undefined, opt_errback?: ((error: a...'. Two different types with this name exist, but they are unrelated.
                                    Type 'Promise<R | IThenable<R>>' is not assignable to type 'Promise<R>'.
                                      Types of property 'then' are incompatible.
                                        Type '<R>(opt_callback?: ((value: R | IThenable<R>) => R | IThenable<R>) | undefined, opt_errback?: ((e...' is not assignable to type '<R>(opt_callback?: ((value: R) => R | IThenable<R>) | undefined, opt_errback?: ((error: any) => a...'.
                                          Types of parameters 'opt_callback' and 'opt_callback' are incompatible.
                                            Types of parameters 'value' and 'value' are incompatible.
                                              Type 'R | IThenable<R>' is not assignable to type 'R'.
                                                Type 'IThenable<R>' is not assignable to type 'R'.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:17
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
FiniteLoopercommented, Aug 2, 2017

It recently came to my attention that there are 2 new compiler options in TS 2.4.x

"noStrictGenericChecks": true

“Disable strict checking of generic signatures in function types.”

"skipLibCheck": true

“Skip type checking of all declaration files (*.d.ts).”

view all options here


i think that all one would need to do is set "skipLibCheck": true and then bad typedefs won’t interfere any more

3reactions
tobiasccommented, Jul 2, 2017

+1

Hardcoding typescript@2.3.4 “fixed” it

node@7.9.0 & node@8.1.3 protractor@5.1.2 mac@10.12.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type does not satisfy the constraint and incorrectly extends ...
I'm trying to implement a generic Specification pattern and a generic Visitor pattern together. Here are my base interfaces ...
Read more >
How to Easily Extend Interfaces in TypeScript - Webtips
Learn how you can extend your interfaces in TypeScript with other ... error: // Interface 'Employee' incorrectly extends interface 'Person'.
Read more >
DefinitelyTyped/DefinitelyTyped - Gitter
when i try to build. Is this any indication i'm doing something wrong? If everything is running correctly i should be on Ts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found