start-express-react icon indicating copy to clipboard operation
start-express-react copied to clipboard

Update tsconfig.json to allow latest ESM methods like toSorted or replaceAll

Open theoDep opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. When working on an issue, I used the replaceAll method implemented in ES2021 and my IDE highlighted an issue with the current lib used in the tsconfig.json of the project.

Describe the solution you'd like Currently, the project uses ES2020 as both target and lib. I think we could probably update target to ES2022 and lib to either ES2022 or ESNext.

This would also allow the use of the top file async syntax.

You can see the different methods implemented by version here: https://www.w3schools.com/js/js_2022.asp.

You can find more information about what's the role of target and lib here: https://www.typescriptlang.org/tsconfig/#target, https://www.typescriptlang.org/tsconfig/#lib

For an easier overview: https://www.totaltypescript.com/tsconfig-cheat-sheet

theoDep avatar Oct 03 '25 15:10 theoDep

Hey i'd like to work on this issue.

As you suggested i checked the resources out and the solution for issue would be, -> update tsconfig.json to use target: "ES2022" and lib: ["ES2022"].

avgmecoding avatar Oct 03 '25 17:10 avgmecoding

@avgmecoding go for it :)

rocambille avatar Oct 04 '25 08:10 rocambille

hey @rocambille created pr kindly review my changes.

avgmecoding avatar Oct 04 '25 13:10 avgmecoding

Closed by #21

rocambille avatar Oct 05 '25 10:10 rocambille