`node_modules/cypress/types/net-stubbing.ts` should be a `.d.ts` file
See original GitHub issueCurrent behavior
When using Cypress as a library, there is one file called node_modules/cypress/types/net-stubbing.ts
which only contains type definitions.
Together with latest version of API extractor, this creates the error:
Error: <project>/node_modules/cypress/types/net-stubbing.ts:1:1 - (ae-wrong-input-file-type) Incorrect file type; API Extractor expects to analyze compiler outputs with the .d.ts file extension. Troubleshooting tips: https://api-extractor.com/link/dts-error
Error description advises to report the problem to the package maintainers…
This file seems to be created during build in the post install script.
The error is not detected by older versions of API extractor (not present with 7.20.1 but present with 7.25.2). This file was already here in older versions of Cypress (I can see the error on Cypress 8.4.1).
Desired behavior
Cypress should export its typing in .d.ts
files rather than in .ts
ones.
Test code to reproduce
Github action failing on that problem.
Cypress Version
8.4.1, 10.1.0
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Documentation - Modules .d.ts - TypeScript
One style of exporting in CommonJS is to export a function. Because a function is also an object, then extra fields can be...
Read more >About "*.d.ts" in TypeScript - Stack Overflow
The "d.ts" file is used to provide typescript type information about an API that's written in JavaScript. The idea is that you're using...
Read more >What is a “.d.ts” file in TypeScript? | by Ohans Emmanuel
d.ts files are called type declaration files. They exist for one purpose only: to describe the shape of an existing module and they...
Read more >What Are *.d.ts files? How to Use *.d.ts Files in TypeScript?
How to use *. d. ts files. ... try restarting your device. Your browser can 't play this video. ... 51K views 2...
Read more >Typescript should auto aquire d.ts files from npm package #9819
Why can't typescript just go through the node_modules and import all d.ts files in the lib folder of the respective packages? Just way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Jym77 Would you be able to submit a PR for this issue?
Released in
10.4.0
.This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.4.0, please open a new issue.