{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/issues/139","repository_url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/issues/139/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/issues/139/events","html_url":"https://github.com/Microsoft/TypeScript-Handbook/issues/139","id":125465033,"number":139,"title":"problem with interfaces ","user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/labels/Docs","name":"Docs","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars.githubusercontent.com/u/972891?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/milestones/1","html_url":"https://github.com/Microsoft/TypeScript-Handbook/milestones/Doc%20Reboot","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-Handbook/milestones/1/labels","id":1576497,"number":1,"title":"Doc Reboot","description":"","creator":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars.githubusercontent.com/u/972891?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-02-10T21:13:31Z","updated_at":"2016-02-10T21:18:15Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-01-07T19:12:37Z","updated_at":"2016-02-10T21:18:15Z","closed_at":"2016-02-10T21:18:15Z","body":"_From @jeevan-reddy on December 20, 2015 16:56_\n\n**Error:\r\nArgument of type '{ size: number; label: string; }' is not assignable to parameter of type '{ label: string; }'.\r\n  Object literal may only specify known properties, and 'size' does not exist in type '{ label: string; }'.**\r\n\r\nMy typesscript version is **1.7.5**\r\n\r\n*Steps to recreate the Error:*\r\n1) Create a .ts file named script.ts\r\n2) type the following code :\r\n``` javascript\r\nfunction printLabel(labelledObj: {label: string}) {\r\n  console.log(labelledObj.label);\r\n}\r\nvar myObj = {size: 10, label: \"Size 10 Object\"};  // myObj is of type {size:number;label:string}\r\n// printLabel(myObj);\r\nprintLabel({size: 10, label: \"Size 10 Object\"});   // the object being passed to printLabel is also of type {size:number;label:string}\r\n```\r\n3) Compile the script.ts using command *tsc script* either from command prompt/powershell\r\n\r\nit is clearly mentioned in documentation  that if we send extra arguments it is ok .please refer to attached code-snippet\r\n![code-snippet](https://cloud.githubusercontent.com/assets/15384537/11918884/31811042-a767-11e5-8d3a-416edadc28e5.JPG)\r\n\r\n*But what is the difference if i assign an object to a variable , pass that variable as argument  and if i directly pass the object as argument ?*\r\n\r\n\r\n\r\n\n\n_Copied from original issue: Microsoft/TypeScript#6175_"}}