This is simpler for Gazelle to be able to generate, since it follows the locality principle: tsconfig.json contains data needed to generate ts_config rule, and no ambients need to be listed on ts_project when the srcs didn't reference them.
Also means Source code doesn't have to include any indication these 'ambient' types are required, as is typical in typescript.
To make this pattern more accessible, we'll also need to improve error messaging to suggest compilerOptions.types needs to be explicit for all compilation units that use that tsconfig.json file, possibly by offering to edit the file.
This is simpler for Gazelle to be able to generate, since it follows the locality principle:
tsconfig.json
contains data needed to generatets_config
rule, and no ambients need to be listed onts_project
when thesrcs
didn't reference them.Also means Source code doesn't have to include any indication these 'ambient' types are required, as is typical in typescript.
To make this pattern more accessible, we'll also need to improve error messaging to suggest
compilerOptions.types
needs to be explicit for all compilation units that use thattsconfig.json
file, possibly by offering to edit the file.