Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
fix: Fix TypeScript iterator support. (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthkh authored Apr 23, 2020
1 parent 24117d0 commit f549896
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/simple_tsify.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = function (b, opts) {
compilerOptions: {
esModuleInterop: true,
jsx: 'react',
downlevelIteration: true,
},
}).outputText)
}
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/typescript/math_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ context('math.ts', function () {
it('test ts-typed variable', function () {
expect(x).to.eq(3)
})
it('test iterator', () => {
const arr = [...Array(100).keys()]

expect(arr[0] + arr[1]).to.eq(1)
})
})

0 comments on commit f549896

Please sign in to comment.