theintern / leadfoot

A JavaScript client library that brings cross-platform consistency to the Selenium WebDriver API.
Other
170 stars 24 forks source link

Tests don't build with TS 3.4 #172

Closed jason0x43 closed 5 years ago

jason0x43 commented 5 years ago

Tests for a project using Leadfoot 2.2.8 won't build with TS 3.4.

node_modules/@theintern/leadfoot/Command.d.ts:101:5 - error TS2416: Property 'waitForDeleted' in type 'Command<T, P, StringResult>' is not assignable to the same property in base type 'Locator<Command<Element, P, string>, Command<Element[], P, string[]>, Command<void, P, string>>'.
  Type '(using: "class name" | "id" | "name" | "partial link text" | "tag name" | "css selector" | "link text" | "xpath", value: string) => Command<void, P, StringResult>' is not assignable to type '(strategy: "class name" | "id" | "name" | "partial link text" | "tag name" | "css selector" | "link text" | "xpath", value: string) => Command<void, P, string>'.
    Type 'Command<void, P, StringResult>' is not assignable to type 'Command<void, P, string>'.
      Type 'StringResult' is not assignable to type 'string'.

101     waitForDeleted(using: Strategy, value: string): Command<void, P, StringResult>;
        ~~~~~~~~~~~~~~

Found 1 error.

To reproduce

Setup a simple project using Leadfoot 2.2.8 (say, with Intern 4.4.2) and TS 3.4.5. At a test suite (unit or functional). Try to build the tests.