Skip to content
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

fix(google-maps): avoid using dotted property access #21074

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

wagnermaciel
Copy link
Contributor

  • 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'.

* 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'.
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 18, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@wagnermaciel wagnermaciel added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Nov 18, 2020
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

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 wagnermaciel merged commit 4a60005 into master Nov 18, 2020
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)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 19, 2020
@wagnermaciel wagnermaciel deleted the google-maps-quick-fix branch January 13, 2021 20:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants