bahmutov / cypress-split

Split Cypress specs across parallel CI machines for speed
MIT License
213 stars 24 forks source link

Fix typings for `cypressSplit` export #114

Closed Baune8D closed 12 months ago

Baune8D commented 12 months ago

The proper way to currently use the library with TypeScript and esModuleInterop: false is:

import * as cypressSplit from 'cypress-split';

setupNodeEvents(on, config) {
    cypressSplit(on, config);
    return config;
},

It works at runtime, but at the same time throws a TS2349 error because of invalid typings.

This PR fixes the typings so imports are now valid using 1 of these approaches:

esModuleInterop: false:

import * as cypressSplit from 'cypress-split';

esModuleInterop: true:

import cypressSplit from 'cypress-split';
github-actions[bot] commented 12 months ago

:tada: This PR is included in version 1.5.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: