More precise descriptions of project reference-related editor options.#3384
Open
DanielRosenwasser wants to merge 1 commit intov2from
Open
More precise descriptions of project reference-related editor options.#3384DanielRosenwasser wants to merge 1 commit intov2from
DanielRosenwasser wants to merge 1 commit intov2from
Conversation
Contributor
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-plant-05c166c10-3384.centralus.5.azurestaticapps.net |
jakebailey
approved these changes
May 8, 2025
| @@ -1,7 +1,49 @@ | |||
| --- | |||
| display: "Disable Source Project Reference Redirect" | |||
| oneline: "Disable preferring source files instead of declaration files when referencing composite projects." | |||
Member
There was a problem hiding this comment.
IIRC the onelines come from the CLI flag descriptions, if that matters to you.
sheetalkamat
requested changes
May 8, 2025
| </tr> | ||
| <tr class="option-description odd"><td colspan="3"> | ||
| <p>Reduce the number of projects loaded automatically by TypeScript.</p> | ||
| <p>Avoid searching for symbols across referenced projects in code editors.</p> |
Member
There was a problem hiding this comment.
This also stops loading reference projects and looking up in it for default project for file.
Comment on lines
+42
to
+43
| we don't want to stop what we're doing and build `projectB` before we can get accurate errors in `projectA`, so TypeScript prefers reading source `.ts` files instead of generated `.d.ts` files if they're around. | ||
|
|
Member
There was a problem hiding this comment.
we always get source file even if project is not yet built and hence no d.ts file
| In larger codebases, this extra work can feel very slow. | ||
|
|
||
| The `disableSourceOfProjectReferenceRedirect` option allows developers to opt out of loading source files over declaration files in the editor ([just as it worked before TypeScript 3.7](/docs/handbook/release-notes/typescript-3-7.html#build-free-editing-with-project-references)). | ||
| As a result, dependencies will need to be build with declaration files in order to get accurate error-checking, code completion, and other editor features in a project with references. |
Member
There was a problem hiding this comment.
And with declarationMap if you want the definition to jump to original source file instead of d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.