GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix(29118): tsconfig.extends as array by navya9singh · Pull Request #50403 · microsoft/TypeScript

Conversation

@navya9singh

@navya9singh navya9singh commented Aug 22, 2022

Copy link
Copy Markdown
Member

Fixes #29118

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thenbe, xiaoxiangmoe, SchroederSteffen, mklueh, fireairforce, fdecampredon, johncmunson, alecmev, kachick, danielbayley, and testfailed reacted with thumbs up emoji cherryblossom000, acidoxee, SchroederSteffen, mklueh, and amitbeck reacted with hooray emoji V-ed and ldgrp reacted with eyes emoji
All reactions
  • 👍 11 reactions
  • 🎉 5 reactions
  • 👀 2 reactions
@navya9singh
tsconfig.extends as array
3b6917c
@typescript-bot TypeScript Bot (typescript-bot) assigned navya9singh Aug 22, 2022
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 22, 2022
@navya9singh
navya9singh requested review from Ryan Cavanaugh (RyanCavanaugh), Andrew Branch (andrewbranch) and Sheetal Nandi (sheetalkamat) August 22, 2022 16:12
@navya9singh
Updated baselines
a50904e
sheetalkamat
Sheetal Nandi (sheetalkamat) requested changes Aug 22, 2022
View reviewed changes

@sheetalkamat Sheetal Nandi (sheetalkamat) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these you can either add assert that type is not "listOrElement"
https://github.com/microsoft/TypeScript/blob/main/src/compiler/builder.ts#L997
https://github.com/microsoft/TypeScript/blob/main/src/compiler/commandLineParser.ts#L2491
https://github.com/microsoft/TypeScript/blob/main/src/compiler/commandLineParser.ts#L2664
https://github.com/microsoft/TypeScript/blob/main/src/executeCommandLine/executeCommandLine.ts#L166
https://github.com/microsoft/TypeScript/blob/main/src/executeCommandLine/executeCommandLine.ts#L282
https://github.com/microsoft/TypeScript/blob/main/src/services/getEditsForFileRename.ts#L76

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/executeCommandLine/executeCommandLine.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/config/configurationExtension.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/config/configurationExtension.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/config/showConfig.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/tsbuildWatch/programUpdates.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@navya9singh
Changes for pr
1717b53
sheetalkamat
Sheetal Nandi (sheetalkamat) requested changes Aug 24, 2022
View reviewed changes

@sheetalkamat Sheetal Nandi (sheetalkamat) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into other comments later

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/testRunner/unittests/tsbuildWatch/programUpdates.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/executeCommandLine/executeCommandLine.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

sheetalkamat
Sheetal Nandi (sheetalkamat) requested changes Aug 24, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Aug 24, 2022
View reviewed changes
Comment thread src/executeCommandLine/executeCommandLine.ts Outdated
possibleValues = getPossibleValues(option.element);
break;
case "listOrElement":
if (option.element.type === "string"){

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Aug 24, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (option.element.type === "string"){
if (option.element.type === "string") {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Aug 24, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Outdated
options[opt.name] = validateJsonOptionValue(opt, args[i] || "", errors);
i++;
}
else{

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Aug 24, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else{
else {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Aug 24, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Outdated
resolutionStack = resolutionStack.concat([resolvedPath]);
const extendedConfig = getExtendedConfig(sourceFile, ownConfig.extendedConfigPath, host, resolutionStack, errors, extendedConfigCache);
const result: ExtendsResult = { options:{} };
if(isString(ownConfig.extendedConfigPath)){

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Aug 24, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces throughout

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@navya9singh
Changes for pr comments
77f9b50
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) reviewed Aug 29, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Outdated
i++;
}
}
Debug.fail();

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Aug 29, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Debug.fail();
Debug.fail("listOrElement not supported here");

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
sheetalkamat
Sheetal Nandi (sheetalkamat) requested changes Sep 1, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/executeCommandLine/executeCommandLine.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/tsbuildWatch/programUpdates.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/testRunner/unittests/tsbuildWatch/programUpdates.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/compiler/commandLineParser.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bluwy Bjorn Lu (bluwy) mentioned this pull request Sep 19, 2022
extending a tsconfig in .svelte-kit/tsconfig.json sveltejs/kit#6868
Closed
This was referenced Oct 27, 2022
Design Meeting Notes, 10/26/2022 #51323
Closed
TypeScript 5.0 Iteration Plan #51362
Closed
@azu azu (azu) mentioned this pull request Nov 2, 2022
2022-11-02のJS: Node.js 18.12.0 LTS、Babel 7.20.0、TypeScript 4.9 RC jser/jser.github.io#1016
Merged
@navya9singh
Merged main, changes for pr, added test case
5ba95f7
sheetalkamat
Sheetal Nandi (sheetalkamat) requested changes Nov 16, 2022
View reviewed changes
Comment thread src/compiler/commandLineParser.ts Outdated
const value = options[name] as CompilerOptionsValue;
const optionDefinition = optionsNameMap.get(name.toLowerCase());
if (optionDefinition) {
Debug.assert(optionDefinition.type !== "listOrElement");

@sheetalkamat Sheetal Nandi (sheetalkamat) Nov 16, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix formatting for some of the changes that has been indented by one extra tab

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread src/testRunner/unittests/tsbuildWatch/programUpdates.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

navya9singh added 4 commits November 28, 2022 10:50
@navya9singh
Fixed formatting and edited a test
f85c772
@navya9singh
Merge branch 'main' into fix(29118)
6558e04
@navya9singh
Resolved errors after a merge conflict
de79220
@navya9singh
Added "string | list" type implentation
1b36b57
@navya9singh
navya9singh requested review from Ryan Cavanaugh (RyanCavanaugh) and Sheetal Nandi (sheetalkamat) November 29, 2022 17:26
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) approved these changes Dec 6, 2022
View reviewed changes
andrewbranch
Andrew Branch (andrewbranch) requested changes Dec 6, 2022
View reviewed changes

@andrewbranch Andrew Branch (andrewbranch) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add a compiler test that shows the new feature working and doing something useful. It looks like the one changed baseline shows that what used to be an invalid config is now doing something, but it’s hard to see that the multiple extended tsconfigs are actually contributing anything.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andrewbranch

Andrew Branch (andrewbranch) commented Dec 6, 2022

Copy link
Copy Markdown
Member

Example:

// @Filename: /tsconfig1.json
{
  "compilerOptions": {
    "strictNullChecks": true
  }
}

// @Filename: /tsconfig2.json
{
  "compilerOptions": {
    "noImplicitAny": true
  }
}

// @Filename: /tsconfig.json
{
  "extends": ["./tsconfig1.json", "./tsconfig2.json"]
  "files": ["./index.ts"]
}

// @Filename: /index.ts
function f(x) {} // noImplicitAny error
let y: string;
y.toLowerCase(); // strictNullChecks error
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sheetalkamat

Sheetal Nandi (sheetalkamat) commented Dec 6, 2022

Copy link
Copy Markdown
Member

Andrew Branch (@andrewbranch) the compiler tests are hard to add with tsconfig. https://github.com/microsoft/TypeScript/pull/50403/files#diff-0556827a3985d4ffd3ed2e51ac63c9d86ba98ab41dca5c7711fb2750188cbe8a shows the test case where multiple tsconfigs are working together ? https://github.com/microsoft/TypeScript/pull/50403/files#diff-97bc6a439e0f02498deab0f7c919e4e7a2f06c6b4832fd2fc7b042f56b141ff9R111 baseline.

While said that we could add test in non watch mode as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andrewbranch

Andrew Branch (andrewbranch) commented Dec 6, 2022

Copy link
Copy Markdown
Member

I saw that baseline, but I couldn’t find any indication in the baseline that the options in the extended configs were relevant. I was looking for a strictNullChecks or noImplicitAny error but didn’t see any. Maybe I missed it in the noise.

There are plenty of compiler tests with tsconfig files, but I don’t know if there are subtle gotchas with them.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sheetalkamat

Sheetal Nandi (sheetalkamat) commented Dec 6, 2022

Copy link
Copy Markdown
Member

navya9singh you probably want to add test like https://github.com/microsoft/TypeScript/blob/main/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts with the contents of test files as shown by Andrew Branch (@andrewbranch) for better clarity

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Dec 7, 2022

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) pack this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at bb0ae2f. You can monitor the build here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/139933/artifacts?artifactName=tgz&fileId=43D4A075BE928283C15303888F67D4786C1B8B67071DA37D39B422AFBEEC049702&fileName=/typescript-5.0.0-insiders.20221207.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@navya9singh
Added compiler test
ef8bd6e
@andrewbranch

Andrew Branch (andrewbranch) commented Dec 12, 2022

Copy link
Copy Markdown
Member

It looks like some changes landed in main that require you to update something in your unit tests. I’m guessing it’s #51798. You’ll want to manually merge main into this branch and then take a look at those test files that no longer build, using Sheetal’s PR as a reference for how to update them.

navya9singh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andrewbranch
Andrew Branch (andrewbranch) approved these changes Dec 12, 2022
View reviewed changes

@andrewbranch Andrew Branch (andrewbranch) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the build is green, looks good to merge.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
navya9singh added 3 commits December 12, 2022 16:22
@navya9singh
Merge branch 'main' into fix(29118)
3a3cdf7
@navya9singh
Resolving programUpdate errors
e0d9de8
@navya9singh
Fixing commandLineParser error
7d6bdb6
@andrewbranch

Andrew Branch (andrewbranch) commented Dec 13, 2022

Copy link
Copy Markdown
Member

:shipit:

navya9singh, fguitton, and phippg reacted with heart emoji Thundercraft5 reacted with eyes emoji
All reactions
  • ❤️ 3 reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@navya9singh
navya9singh merged commit 7267fca into main Dec 13, 2022
@navya9singh
navya9singh deleted the fix(29118) branch December 13, 2022 19:16
@orta

Orta Therox (orta) commented Dec 14, 2022

Copy link
Copy Markdown
Contributor

Very cool

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aleksei-berezkin Aleksei Berezkin (aleksei-berezkin) mentioned this pull request Dec 28, 2022
Multiple inheritance in tsconfig.json SchemaStore/schemastore#2682
Merged
@karlhorky Karl Horky (karlhorky) mentioned this pull request Jan 3, 2023
Feature request: allow user to merge extended arrays in tsconfig files #20110
Open
@mklueh Marian Klühspies (mklueh) mentioned this pull request Jan 16, 2023
"Object literal may only specify known properties...'auth' does not exist in type 'NuxtConfig'" in nuxt.config.ts nuxt/nuxt#12386
Closed
This was referenced Feb 20, 2023
Figure out a way to proper support auto imports in editors cngJo/nuxt-turborepo#5
Closed
TypeScript 5: import .nuxt/tsconfig.json for nuxt apps cngJo/nuxt-turborepo#7
Open
@JeremyMoeglich Jeremy Möglich (JeremyMoeglich) mentioned this pull request Mar 12, 2023
Support tsconfig extending multiple tsconfigs, typescript 5.0 sveltejs/kit#9412
Closed
@johncmunson John Munson (johncmunson) mentioned this pull request Mar 17, 2023
Overcoming the Need for TSConfig Multiple Inheritance NiGhTTraX/ts-monorepo#195
Closed
@dpschen Dominik Pschenitschni (dpschen) mentioned this pull request Mar 19, 2023
Enhancement: a dedicated config for libraries vuejs/tsconfig#5
Closed
@bradley-marker-ck

Bradley Marker (bradley-marker-ck) commented Mar 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Just a heads up if you're sharing a tsconfig from a package. It seems [email protected] was not restricted by the exports from the package.json file. It is now with @[email protected].

The tsconfig.json file not found error was the last error when running tsc.

In my case, it was also causing eslint (with @typescript-eslint/parser) to fail with out of memory errors. Since we run eslint before tsc, it was a few tries before I decided to skip eslint and run tsc and was able to find the problem.

Jerryh001 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kachick Kenichi Kamiya (kachick) mentioned this pull request Apr 17, 2023
Welcome TypeScript 5 era kachick/action-typescript-template#287
Closed
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewbranch Andrew Branch (andrewbranch) andrewbranch approved these changes
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) RyanCavanaugh approved these changes
@sheetalkamat Sheetal Nandi (sheetalkamat) sheetalkamat approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@navya9singh navya9singh

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

PR Backlog
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tsconfig.extends as array

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@navya9singh @andrewbranch @sheetalkamat @DanielRosenwasser @typescript-bot @orta @bradley-marker-ck @RyanCavanaugh
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.