Skip to content

new rule 'const-parameters' #34

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
ajafff opened this issue Oct 1, 2017 · 0 comments
Closed

new rule 'const-parameters' #34

ajafff opened this issue Oct 1, 2017 · 0 comments

Comments

@ajafff
Copy link
Owner

ajafff commented Oct 1, 2017

Similar to tslint's no-parameter-reassignment, but allows users to declare which parameter should be considered const:

function fn(/**@const*/ foo, bar) {
    foo++; // error
    bar++; // no error
}

Recognise /**@const*/ and /**@constant*/

Ref: microsoft/TypeScript#18497

@ajafff ajafff closed this as completed in 020c038 Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant