Closed
Conversation
For the tests in //packages/compiler-cli/src/ngtsc/typecheck, this commits uses a `TypeCheckFile` for the environment, rather than a `FakeEnvironment`. Using a real environment gives us more flexibility with testing.
This commit fixes the behavior when creating a type constructor for a directive when the following conditions are met. 1. The directive has bound generic parameters. 2. Inlining is not available. (This happens for language service compiles). Previously, we would throw an error saying 'Inlining is not supported in this environment.' The compiler would stop type checking, and the developer could lose out on getting errors after the compiler gives up. This commit adds a useInlineTypeConstructors to the type check config. When set to false, we use `any` type for bound generic parameters to avoid crashing. When set to true, we inline the type constructor when inlining is required. Addresses angular#40963
Contributor
|
Closed by commit 57644e9 |
mhevery
pushed a commit
that referenced
this pull request
Mar 19, 2021
For the tests in //packages/compiler-cli/src/ngtsc/typecheck, this commits uses a `TypeCheckFile` for the environment, rather than a `FakeEnvironment`. Using a real environment gives us more flexibility with testing. PR Close #41268
mhevery
pushed a commit
that referenced
this pull request
Mar 19, 2021
) This commit fixes the behavior when creating a type constructor for a directive when the following conditions are met. 1. The directive has bound generic parameters. 2. Inlining is not available. (This happens for language service compiles). Previously, we would throw an error saying 'Inlining is not supported in this environment.' The compiler would stop type checking, and the developer could lose out on getting errors after the compiler gives up. This commit adds a useInlineTypeConstructors to the type check config. When set to false, we use `any` type for bound generic parameters to avoid crashing. When set to true, we inline the type constructor when inlining is required. Addresses #40963 PR Close #41268
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
port #41043 to patch branch.
#41043 was merged into master but not the patch branch because of merge conflict with
11.2.xbranch. This ports #41043 to11.2.xbranch.Note to caretaker: this should not need review from the usual groups because the original PR for this (#41043) was already approved. Presubmit is not necessary because this is not going into master.