Skip to content

[🐛 Bug]: @wdio/cucumber-framework 'DataTable' refers to a value, but is being used as a type here. (TS2749) #10605

@patrickschilder

Description

@patrickschilder

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

Since @wdio/cucumber-framework version 8.10.2 i get a type error on Datatables used in cucumber step definitions.
'DataTable' refers to a value, but is being used as a type here. (TS2749)
It was working correctly up and till @wdio/cucumber-framework 8.10.1

What is your expected behavior?

No response

How to reproduce the bug.

import { When, DataTable } from '@wdio/cucumber-framework'

When('This is my step definition', async (myDatatable: DataTable) => {
    for (const myData of myDatatable.hashes()) {
        // do something
    }
})

Relevant log output

There is no issue running the test, but my IDE is giving error TS2749

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions