Explicitly specify rootDir to satisfy upcoming TypeScript v6. (#4599)

See [1] and [2] where the "rootDir" needs to be explicitly specified, otherwise it will default to "." unlike v5 which was defaulted to the common root folder of all input files.

This fixes a build error in the downstream Chromium repository, see https://issues.chromium.org/issues/485931998.

[1] https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/#up-front-adjustments
[2] https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/#rootdir-now-defaults-to-.
This commit is contained in:
freshp86 2026-02-19 16:07:16 -08:00 committed by GitHub
parent 49f76dcedb
commit d483bf3bc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@
"compilerOptions": {
"lib": ["dom", "ES2023"],
"module": "esnext",
"rootDir": "./src",
// Use types only from these packages (not everything in package.json, which is the default).
// Note that TypeScript's `/// <reference />` is the same as adding an entry here - it's global
// to the whole project.