Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Enable no-angle-bracket-type-assertion #141

Merged
1 commit merged into from
Nov 16, 2018

Conversation

ThomasdenH
Copy link
Contributor

Since angle bracket type assertions were replaced by the as syntax, it's probably a good idea to use this instead. See also the rationale on the lint page.

Since angle bracket type assertions were replaced by the `as` syntax, it's probably a good idea to use this instead. See also the [rationale on the lint page](https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion/).
@ghost
Copy link

ghost commented Sep 26, 2018

Searching = <\w+> on DefinitelyTyped shows 107 results -- fixing manually would be doable since a lot of those are copy-pasted. Not sure if this is worth it though -- @RyanCavanaugh thoughts?

@ThomasdenH
Copy link
Contributor Author

There are other ways of casting, like in (<HTMLElement>element).accessKeyLabel. It's probably quite hard to write an all-encompassing RegEx...

@ThomasdenH
Copy link
Contributor Author

Adding it as a warning at first is also a possibility, this would be less intrusive and give time to update current definitions.

@RyanCavanaugh
Copy link
Member

I'd be OK with this PR if it just turned it on for packages in which it wouldn't create a new warning (IOW make this change + disable it in folders where it needs to be disabled)

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants