use isParameterPropertyDeclaration to test for paramter propoerties

This commit is contained in:
Mohamed Hegazy 2016-06-29 12:09:49 -07:00
parent 7836ba093e
commit b1b3ae07e0

View File

@ -14557,7 +14557,7 @@ namespace ts {
error(local.valueDeclaration.name, Diagnostics._0_is_declared_but_never_used, local.name);
}
else if (local.valueDeclaration.kind === SyntaxKind.Parameter && compilerOptions.noUnusedParameters) {
if (local.valueDeclaration.flags === 0) {
if (!isParameterPropertyDeclaration(<ParameterDeclaration>local.valueDeclaration)) {
error(local.valueDeclaration.name, Diagnostics._0_is_declared_but_never_used, local.name);
}
}