Skip to content

Issues with JS to TS conversion exercise #379

@evilC

Description

@evilC

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions