Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(experimental-utils): add onCodePathStart and onCodePathEnd to RuleListener #2930

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

Closed
wants to merge 1 commit into from

Conversation

wcandillon
Copy link

No description provided.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @wcandillon!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@wcandillon
Copy link
Author

I realize that this type can be extended via createRule so this might not be necessary.

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

the reason this was never added was because TS does not allow you to mix known properties with an index signature unless that index signature exactly matches all known properties.

So by adding these two signatures (as you can see) this causes a hard failure in TS because (codePath: { id: string }) => void is not assignable to RuleFunction.

I don't know of a way to solve this.

@bradzacher bradzacher changed the title Add onCodePathStart and onCodePathEnd to RuleListener feat(experimental-utils): add onCodePathStart and onCodePathEnd to RuleListener Jan 19, 2021
@bradzacher bradzacher added the enhancement New feature or request label Jan 19, 2021
@wcandillon wcandillon closed this Jan 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants