You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
slice() doesn't exist in iterator. It's a failure. It happened because Cypress 4.4.1 transpiled the code with typescript.
It was a famous bug in microsoft/TypeScript#8856, and fixed in TypeScript 3.6.x. Unfortunately, it's still not working in typescript 3.8.3 (current).
I was naive. I thought everything that works fine in babel would work fine in typescript. They're different programs. It's a nonsense.
Desired behavior:
Currently, when typescript exists in the user's project folder, Cypress uses it to transpile every test file.
To solve this problem, we need to use typescript for .ts and .tsx files and babel for .js, .jsx.
I was worrying about the breaking change. But we can avoid it by adding typescriptOnly option. If it's true, every file will be transpiled with typescript when typescript exists. If not, only ts, tsx files will be transpiled with typescript.
If you agree with this idea, I'll go implement this.
The text was updated successfully, but these errors were encountered:
EDIT: I learned that the case below can be solved by adding
downlevelIteration
option. So, close this.Is this a Feature or Bug?
Bug
Current behavior:
In cypress-io/cypress#7098, test failed because the code below generates wrong ES5 code:
slice()
doesn't exist in iterator. It's a failure. It happened because Cypress 4.4.1 transpiled the code withtypescript
.It was a famous bug in microsoft/TypeScript#8856, and fixed in TypeScript 3.6.x. Unfortunately, it's still not working in typescript 3.8.3 (current).
I was naive. I thought everything that works fine in babel would work fine in typescript. They're different programs. It's a nonsense.
Desired behavior:
Currently, when typescript exists in the user's project folder, Cypress uses it to transpile every test file.
To solve this problem, we need to use typescript for
.ts
and.tsx
files and babel for.js
,.jsx
.I was worrying about the breaking change. But we can avoid it by adding
typescriptOnly
option. If it's true, every file will be transpiled with typescript when typescript exists. If not, onlyts
,tsx
files will be transpiled with typescript.If you agree with this idea, I'll go implement this.
The text was updated successfully, but these errors were encountered: