-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Milestone
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 .
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this