-
Notifications
You must be signed in to change notification settings - Fork 594
Port type acquisition parsing from tsconfig.json
#852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Pull Request Overview
This PR implements the initial parsing support for the new "typeAcquisition" configuration in tsconfig/json files. Key changes include adding baseline tests and updating the parsing logic to process "typeAcquisition" properties, introducing new core types and option declaration for typeAcquisition, and integrating these changes into existing test and parsing functions.
Reviewed Changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
testdata/baselines/reference/config/tsconfigParsing/* | Added new baselines that verify the conversion of jsconfig/tsconfig files with typeAcquisition data |
internal/tsoptions/* | Updated parsing logic and added default handling functions (e.g. getDefaultTypeAcquisition) for typeAcquisition |
internal/tsoptions/parsinghelpers.go | Introduced ParseTypeAcquisition and related helper types to process typeAcquisition entries |
internal/tsoptions/declstypeacquisition.go | New file declaring the typeAcquisition options for tsconfig parsing |
internal/core/* | Added the TypeAcquisition structure and updated ParsedOptions to include typeAcquisition |
internal/execute/tsc_test.go | Added tests to verify typeAcquisition parsing logic |
Wrong PR mentioned I think :) |
options := getDefaultCompilerOptions(configFileName) | ||
// var typeAcquisition *compiler.TypeAcquisition | ||
compilerOptions := getDefaultCompilerOptions(configFileName) | ||
var typeAcquisition *core.TypeAcquisition |
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.
This should probably be getDefaultTypeAcquistion
https://github.com/microsoft/TypeScript/blob/main/src/compiler/commandLineParser.ts#L3545 .
"maxNodeModuleJsDepth": 2, | ||
"configFilePath": "/apath/jsconfig.json" | ||
} | ||
|
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.
Here you should have gotten "enable": true
…ns-with-typeAcquisition.js
This uses the beginning of the type acquisition definitions from #844