cypress-io / cypress-io/code-coverage

Any plans for DefinitelyTyped support?

Open
#257 7 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
445
Forks
115
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I was following the [Cypress Full Stack Code Coverage guide](https://docs.cypress.io/guides/tooling/code-coverage.html#Full-stack-code-coverage) and wanted to instrument my express back end by doing the following in my `index.ts` file:
```typescript
import express from "express";
import cypressCodeCoverage from "@cypress/code-coverage/middleware/express";

const app = express();
cypressCodeCoverage(app);
```
I get the "Try `npm install @types/cypress__code-coverage` if it exists or add a new declaration (.d.ts) file containing `declare module '@cypress/code-coverage/middleware/express';`" error. When I tried to install the DefinitelyTyped module, I realized one does not exist for `@types/cypress__code-coverage`.

**Describe the solution you'd like**
Either a new package in the DefinitelyTyped repo for `@types/cypress_code-coverage`, or for the package itself to natively support typescript for back end instrumentation.

**Describe alternatives you've considered**
I'm happy to workaround this in the mean time by adding a global type declaration file for my package. I just wanted to see if you had any plans to support this or if you'd be okay with me putting up a PR for it (and see which approach you preferred)!

**Additional context**
Let me know if you need anything else!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.