Skip to content

Commit

Permalink
fix: remove strictBuiltinIteratorReturn to support old typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Feb 14, 2025
1 parent 6234340 commit f790e7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-hounds-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/ts-node-paths": patch
---

remove `strictBuiltinIteratorReturn` to support old typescript
4 changes: 4 additions & 0 deletions src/tsconfig/getCompilerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export function getCompilerOptions(path: string): CompilerOptions {
showWarns("`baseUrl` use './' instead of `./src`", path);
}

// compatibility to support old typescript before 5.6.
// strictBuiltinIteratorReturn - strictBuiltinIteratorReturn Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
delete compilerOptions.strictBuiltinIteratorReturn;

return {
paths: {},
// https://forgemia.inra.fr/lipme/ts-biofiledetector/-/blob/main/tsconfig.json
Expand Down

0 comments on commit f790e7a

Please sign in to comment.