{"action":"opened","issue":{"url":"https://api.github.com/repos/lukescott/es-type-hinting/issues/23","labels_url":"https://api.github.com/repos/lukescott/es-type-hinting/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/lukescott/es-type-hinting/issues/23/comments","events_url":"https://api.github.com/repos/lukescott/es-type-hinting/issues/23/events","html_url":"https://github.com/lukescott/es-type-hinting/issues/23","id":87545686,"number":23,"title":"Defaults for base values","user":{"login":"lukescott","id":486224,"avatar_url":"https://avatars.githubusercontent.com/u/486224?v=3","gravatar_id":"","url":"https://api.github.com/users/lukescott","html_url":"https://github.com/lukescott","followers_url":"https://api.github.com/users/lukescott/followers","following_url":"https://api.github.com/users/lukescott/following{/other_user}","gists_url":"https://api.github.com/users/lukescott/gists{/gist_id}","starred_url":"https://api.github.com/users/lukescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukescott/subscriptions","organizations_url":"https://api.github.com/users/lukescott/orgs","repos_url":"https://api.github.com/users/lukescott/repos","events_url":"https://api.github.com/users/lukescott/events{/privacy}","received_events_url":"https://api.github.com/users/lukescott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-11T23:58:33Z","updated_at":"2015-06-11T23:58:33Z","closed_at":null,"body":"We need to put somewhere in this spec that base values provide defaults if not specified.\r\n\r\nFor example, the following code:\r\n```javascript\r\nfunction doSomething(s string, n number, b boolean) {\r\n}\r\nvar obj = {\r\n  s string,\r\n  n number,\r\n  b boolean\r\n};\r\n```\r\n\r\nShould desugar to:\r\n```javascript\r\nfunction doSomething(s = \"\", n = 0, b = false) {\r\n}\r\nvar obj = {\r\n  s: \"\",\r\n  n: 0,\r\n  b: false\r\n};\r\n```\r\n\r\nThat way you don't end up with undesired behavior with `undefined`."}}