TypeScript Version: 2.1.0-dev.20161003
Code
classAnimal{constructor(privatespecies: string){}printSpecies(){let{ species }=this;console.log(species);}}Expected behavior:
If I have the noUnusedLocals option enabled, the code should compile without warnings because the species property is being used.
Actual behavior:
If I have the noUnusedLocals option enabled, I receive:
src/index.ts(2,23): error TS6138: Property 'species' is declared but never used.
TypeScript Version: 2.1.0-dev.20161003
Code
Expected behavior:
If I have the
noUnusedLocalsoption enabled, the code should compile without warnings because thespeciesproperty is being used.Actual behavior:
If I have the
noUnusedLocalsoption enabled, I receive: