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

Set type assertion to the recommended way #31042

Closed

Conversation

kroeder
Copy link
Contributor

@kroeder kroeder commented Jun 14, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The doc for User Input uses

this.values += (<HTMLInputElement>event.target).value + ' | ';

Angular CLI generates a tslint that uses tslint:recommended by default and the recommended type assertion value is "no-angle-bracket-type-assertion": true,

Issue Number: N/A

What is the new behavior?

Set

this.values += (<HTMLInputElement>event.target).value + ' | ';

to

this.values += (event.target as HTMLInputElement).value + ' | ';

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kroeder kroeder requested a review from a team as a code owner June 14, 2019 06:42
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@kroeder
Copy link
Contributor Author

kroeder commented Jun 14, 2019

Accidentally copy pasted the wrong commit message. I'll fix that

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Angular uses tslint:recommended by default. The default for no-angle-bracket-type-assertion is true
See https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts#L69
@kroeder kroeder force-pushed the user-input-keyup-docs-type-assertion branch from 2e73a0b to a135dac Compare June 14, 2019 07:09
@ngbot ngbot bot added this to the needsTriage milestone Jun 14, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 14, 2019
@kapunahelewong kapunahelewong added the state: needs eng review Needs technical review and approval from engineering team label Jul 18, 2019
@kapunahelewong kapunahelewong added this to Need Assistance in docs Jul 18, 2019
@kroeder
Copy link
Contributor Author

kroeder commented Sep 18, 2019

If you agree with this change I can also scan for more places in the documentation that use the previous syntax and fix those as well. Just let me know! 🙂

@IgorMinar
Copy link
Contributor

thank you for the contribution @kroeder !

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Oct 2, 2019
@IgorMinar IgorMinar removed the request for review from brandonroberts October 2, 2019 17:58
@IgorMinar IgorMinar added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 2, 2019
@IgorMinar
Copy link
Contributor

merge-assistance: global approval

atscott pushed a commit that referenced this pull request Oct 2, 2019
Angular uses tslint:recommended by default. The default for no-angle-bracket-type-assertion is true
See https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts#L69

PR Close #31042
@atscott atscott closed this in 3de59d4 Oct 2, 2019
@kroeder kroeder deleted the user-input-keyup-docs-type-assertion branch October 4, 2019 11:14
@jbogarthyde jbogarthyde moved this from Need Assistance from Eng. to Done in docs Oct 7, 2019
ODAVING pushed a commit to ODAVING/angular that referenced this pull request Oct 18, 2019
Angular uses tslint:recommended by default. The default for no-angle-bracket-type-assertion is true
See https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts#L69

PR Close angular#31042
@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 Nov 4, 2019
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 effort1: hours freq1: low merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: low state: needs eng review Needs technical review and approval from engineering team target: patch This PR is targeted for the next patch release type: bug/fix
Projects
docs
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants