Skip to content

Conversation

mdmower-csnw
Copy link
Contributor

@mdmower-csnw mdmower-csnw commented Sep 26, 2025

Hand roll a type declaration file for flat.js that accurately reflects the exported plugin. This resolves type errors when attempting to use globals and recommended configs in type-checked eslint configs and also aids in autocomplete when typing (as in keyboard button press, not "does it satisfy expected type") properties of the plugin.

Fixes #232

Note: I verified flat.d.ts is included in the npm package with npm pack and then also verified the types work in another project by installing that package.

Hand roll a type declaration file for `flat.js` that accurately reflects
the exported plugin. This resolves type errors when attempting to use
`globals` and `recommended` configs in type-checked eslint configs and
also aids in autocomplete when typing (as in keyboard button press, not
"does it satisfy expected type") properties of the plugin.
@CLAassistant
Copy link

CLAassistant commented Sep 26, 2025

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link

MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Collaborator

I also successfully tested installing this externally, so with the suggested changes it should be good to go.

@mdmower-csnw mdmower-csnw changed the title Add type declaration file feat: add type declaration file Sep 27, 2025
Update code style from review

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
MikeMcC399

This comment was marked as resolved.

@MikeMcC399

This comment was marked as resolved.

@jennifer-shehane jennifer-shehane merged commit 006d74f into cypress-io:master Oct 1, 2025
10 checks passed
@jennifer-shehane
Copy link
Member

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export Typescript types declaration

5 participants