You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@RyanCavanaugh the discussion you mentioned ended nowhere, but I like the point that was raised there: destructuring has been already accepting commas for unused array elements:
changed the title [-]With `--nuUnusedParameters`, how can i skip uneeded parameters[/-][+]with --noUnusedParameters how can i skip uneeded parameters[/+]on Jul 1, 2016
Activity
mhegazy commentedon Jun 30, 2016
i was thinking of
_
as a special case. but that does not seem nice. the other option is to use arguments.[-]how can i skip uneeded parameters[/-][+]With `--nuUnusedParameters`, how can i skip uneeded parameters[/+]zpdDG4gta8XKpMCd commentedon Jun 30, 2016
_
works well in f#, and i like it a lot, but might be a breaking change for stuff like underscore.jsRyanCavanaugh commentedon Jun 30, 2016
I would propose that any local starting with
_
is not subject to unused checks. For multiple parameters you could then write(_0, _1, x) => x
zpdDG4gta8XKpMCd commentedon Jun 30, 2016
consider
third<T>(,, z: T): T { return z; }
RyanCavanaugh commentedon Jul 1, 2016
Discussed quite a bit here https://esdiscuss.org/topic/uninteresting-parameters and I would defer to their judgement
Fix #9458: exclude parameters starting with underscore from unusedPar…
mhegazy commentedon Jul 1, 2016
I have a fix out in #9464. any parameter name starting with
_
is exempt from the check.mhegazy commentedon Jul 1, 2016
if @RyanCavanaugh gives me a :+: i can get it in
zpdDG4gta8XKpMCd commentedon Jul 1, 2016
@RyanCavanaugh the discussion you mentioned ended nowhere, but I like the point that was raised there: destructuring has been already accepting commas for unused array elements:
[-]With `--nuUnusedParameters`, how can i skip uneeded parameters[/-][+]with --noUnusedParameters how can i skip uneeded parameters[/+]22 remaining items