Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tests don't build with TS 3.4 #172

Closed
jason0x43 opened this issue Apr 29, 2019 · 0 comments
Closed

Tests don't build with TS 3.4 #172

jason0x43 opened this issue Apr 29, 2019 · 0 comments

Comments

@jason0x43
Copy link
Member

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.

@jason0x43 jason0x43 changed the title Functional tests don't build with TS 3.4 Tests don't build with TS 3.4 Apr 29, 2019
jason0x43 added a commit that referenced this issue Apr 29, 2019
The third generic field for Locator should have been be a 'pass thru'
typing for Command, using StringResult rather than string.

fixes #172
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant