fix(google-maps): avoid using dotted property access - #21074
Merged
Conversation
* This was causing internal errors because these properties are not declared on SimpleChanges. According to the error: 'The type has a string index signature, but it is being accessed using a dotted property access'.
crisbeto
approved these changes
Nov 18, 2020
crisbeto
left a comment
Member
There was a problem hiding this comment.
LGTM, good catch. We're supposed to have a lint rule for this specific case, but it didn't flag it for some reason 🤔. I'll look into why the linter didn't pick it up.
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
Nov 18, 2020
Follow-up to angular#21074. We have a lint rule that flags property accesses like `changes.foo` where `changes` is a `SimpleChanges` object, because they'll break under Closure compiler. The rule depends on the TS type checker to identify the objects, but it seems like somewhere along the way, tslint changed how they construct the `Program` which removed the necessary type information. These changes add a less complicated fallback which looks at whether the name of the receiver of a property access is the same as the name of the first method parameter.
wagnermaciel
added a commit
that referenced
this pull request
Nov 18, 2020
* This was causing internal errors because these properties are not declared on SimpleChanges. According to the error: 'The type has a string index signature, but it is being accessed using a dotted property access'. (cherry picked from commit 4a60005)
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
Nov 18, 2020
Follow-up to angular#21074. We have a lint rule that flags property accesses like `changes.foo` where `changes` is a `SimpleChanges` object, because they'll break under Closure compiler. The rule depends on the TS type checker to identify the objects, but it seems like somewhere along the way, tslint changed how they construct the `Program` which removed the necessary type information. These changes add a less complicated fallback which looks at whether the name of the receiver of a property access is the same as the name of the first method parameter.
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
Nov 20, 2020
Follow-up to angular#21074. We have a lint rule that flags property accesses like `changes.foo` where `changes` is a `SimpleChanges` object, because they'll break under Closure compiler. The rule depends on the TS type checker to identify the objects, but it seems like somewhere along the way, tslint changed how they construct the `Program` which removed the necessary type information. These changes add a less complicated fallback which looks at whether the name of the receiver of a property access is the same as the name of the first method parameter.
annieyw
pushed a commit
that referenced
this pull request
Nov 24, 2020
Follow-up to #21074. We have a lint rule that flags property accesses like `changes.foo` where `changes` is a `SimpleChanges` object, because they'll break under Closure compiler. The rule depends on the TS type checker to identify the objects, but it seems like somewhere along the way, tslint changed how they construct the `Program` which removed the necessary type information. These changes add a less complicated fallback which looks at whether the name of the receiver of a property access is the same as the name of the first method parameter.
annieyw
pushed a commit
that referenced
this pull request
Nov 24, 2020
Follow-up to #21074. We have a lint rule that flags property accesses like `changes.foo` where `changes` is a `SimpleChanges` object, because they'll break under Closure compiler. The rule depends on the TS type checker to identify the objects, but it seems like somewhere along the way, tslint changed how they construct the `Program` which removed the necessary type information. These changes add a less complicated fallback which looks at whether the name of the receiver of a property access is the same as the name of the first method parameter. (cherry picked from commit 2465131)
|
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.
are not declared on SimpleChanges. According to the error:
'The type has a string index signature, but it is being
accessed using a dotted property access'.