Closed
Description
The example below compiles - it shouldn't, I think...
ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$ cat foo.ts
function whyTSwhy(config: {
name?:string
})
{
console.log(config.name);
console.log(name);
}
ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$ tsc -t ES5 foo.ts
$
Typescript fails to see that there is no "name" variable - only "config.name" is valid in this context.
I am using the version from the repos, commit af4a121 .