Open justinvp opened 4 years ago
We should also look at updating the built-in default settings for when a project doesn't have a tsconfig.json
present:
We should also do a pass of the docs to ensure any tsconfig
snippets are updated and consistent.
As part of this, we should consider explicitly setting lib
as follows:
"lib": ["es2018"],
Otherwise, the default library used by TS when target
is set to 2018
is es2018.full
, which includes a bunch of stuff like dom
, webworkers
, etc. which isn't relevant outside the browser.
https://github.com/microsoft/TypeScript/blob/master/lib/lib.es2018.full.d.ts vs https://github.com/microsoft/TypeScript/blob/master/lib/lib.es2018.d.ts
Pulumi 3.x supports Node 12+. We should look into using https://github.com/tsconfig/bases/blob/main/bases/node12.json as the basis for the tsconfig.json
in templates.
Node 10+ has broad support for ES2018 -- we should update the TS templates to target it.