test-todomvc-using-app-actions icon indicating copy to clipboard operation
test-todomvc-using-app-actions copied to clipboard

Issues with JS to TS conversion exercise

Open evilC opened this issue 2 years ago • 1 comments

Hi, I am trying to use this repo as an exercise to work through the blog post you detailed in Convert Cypress Specs from JavaScript to TypeScript, but things are not quite going as detailed in the blog post.

I cloned 09-regression

Step 2 Already appears to have been done - the following is already at the start of adding-spec.js:

// type definitions for Cypress object "cy" and cypress-grep
/// <reference types="cypress-grep" />
// type definition for out TodoModel
/// <reference path='./model.d.ts' />
// @ts-check

And I already see the full info in the tooltip So I tried deleting this, but still it does not seem to revert to just showing any: image

Undeterred, I move on... I complete steps 3 through 5 and all goes according to how it is in the blog post.

However, when I get to Step 6...

npm run lint

> [email protected] lint      
> tsc --noEmit --pretty --allowJs cypress/**/*.js

error TS6053: File 'cypress/**/*.js' not found.
  The file is in the program because:
    Root file specified for compilation        

Found 1 error.

Any idea what is going wrong?

evilC avatar Mar 01 '23 13:03 evilC

Update - I think I worked out what the issue is with the tsc command. I am on windows, and it does not support * or **

evilC avatar Mar 01 '23 14:03 evilC