isaacs / tshy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow compilerOptions.target to flow from base tsconfig

mpodwysocki opened this issue · comments

I am wondering why es2022 was hardcoded in the base build.json in the .tshy folder. Could that be configurable or is there a particular ES2022 set that you are using for tshy specifically?

Hm, I don't have a good answer for this one. Maybe it should just be in the default tsconfig.json? Istr something not working when target isn't set, but tbh I don't recall what it was, or if that option was just thrown at the wall to see what sticks.

@isaacs could we make this configurable then from our standpoint to specify that in the base tsconfig?

Hm, since it's defaulting in the recommended root tsconfig anyway, could probably just strike this line: https://github.com/isaacs/tshy/blob/main/src/tsconfig.ts#L53

For posterity if anyone comes searching and finds this issue, can you share what situation you're finding where it needs to be different?

@isaacs For example, we shipped our new Azure SDK Core JavaScript libraries which were previously targeting ES2020/ES2017. Some of our customers complained once upgrading that their TypeScript version did not support particular syntax which were in ES2022 such as this issue: Azure/azure-sdk-for-js#28918

Ahhh, yes, node 14. Cool, makes sense.

Fixed by #55