{"action":"created","issue":{"url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/1","labels_url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/1/comments","events_url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/1/events","html_url":"https://github.com/splodingsocks/FlowTyped/pull/1","id":112197182,"number":1,"title":"Type definitions for (a small subset of) underscore","user":{"login":"danvk","id":98301,"avatar_url":"https://avatars.githubusercontent.com/u/98301?v=3","gravatar_id":"","url":"https://api.github.com/users/danvk","html_url":"https://github.com/danvk","followers_url":"https://api.github.com/users/danvk/followers","following_url":"https://api.github.com/users/danvk/following{/other_user}","gists_url":"https://api.github.com/users/danvk/gists{/gist_id}","starred_url":"https://api.github.com/users/danvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danvk/subscriptions","organizations_url":"https://api.github.com/users/danvk/orgs","repos_url":"https://api.github.com/users/danvk/repos","events_url":"https://api.github.com/users/danvk/events{/privacy}","received_events_url":"https://api.github.com/users/danvk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-19T17:45:33Z","updated_at":"2015-10-19T21:41:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/splodingsocks/FlowTyped/pulls/1","html_url":"https://github.com/splodingsocks/FlowTyped/pull/1","diff_url":"https://github.com/splodingsocks/FlowTyped/pull/1.diff","patch_url":"https://github.com/splodingsocks/FlowTyped/pull/1.patch"},"body":"Thanks for creating this repo! Let's get things rolling.\r\n\r\nHere is [my project's][1] lame attempt to write flow declarations for underscore. We've written declarations only as we've used new functions, so it's nowhere close to complete.\r\n\r\nOpen questions:\r\n- What should tests look like?\r\n- What's the best way to integrate FlowTyped into a project (should it be an NPM module?)\r\n\r\nSee also https://github.com/facebook/flow/issues/946, which makes this less useful than it could be.\r\n\r\n[1]: https://github.com/hammerlab/pileup.js/blob/d603ce88a6d0d43290faafa22bc6c4dc9d5c2dd5/lib/underscore.js"},"comment":{"url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/comments/149355698","html_url":"https://github.com/splodingsocks/FlowTyped/pull/1#issuecomment-149355698","issue_url":"https://api.github.com/repos/splodingsocks/FlowTyped/issues/1","id":149355698,"user":{"login":"danvk","id":98301,"avatar_url":"https://avatars.githubusercontent.com/u/98301?v=3","gravatar_id":"","url":"https://api.github.com/users/danvk","html_url":"https://github.com/danvk","followers_url":"https://api.github.com/users/danvk/followers","following_url":"https://api.github.com/users/danvk/following{/other_user}","gists_url":"https://api.github.com/users/danvk/gists{/gist_id}","starred_url":"https://api.github.com/users/danvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danvk/subscriptions","organizations_url":"https://api.github.com/users/danvk/orgs","repos_url":"https://api.github.com/users/danvk/repos","events_url":"https://api.github.com/users/danvk/events{/privacy}","received_events_url":"https://api.github.com/users/danvk/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T21:41:34Z","updated_at":"2015-10-19T21:41:34Z","body":"Your point that this is allowed by the library is well-taken, but I don't entirely agree with it.\r\n\r\n`1 * \"2\"` is perfectly legal JavaScript, after all, but it's rejected by Flow:\r\n\r\n```\r\n$ echo 'console.log(1 * \"2\")' | node\r\n2\r\n$ echo '1 * \"2\"' | flow check-contents\r\n  1: 1 * \"2\"\r\n         ^^^ string. This type is incompatible with\r\n  1: 1 * \"2\"\r\n     ^^^^^^^ number\r\n\r\nFound 1 error\r\n```\r\n\r\nand for good reason—it almost certainly represents a mistake. Calling `_.isEqual` with zero, one or 3+ parameters feels the same to me. I find it far more likely that `_.isEqual(a)` is a mistake that should have been `_.isEqual(a, b)` than an intentional check for `a === undefined`.\r\n\r\nYou're right that this doesn't come up when you have an implementation for the function, but that's not really an option for declaration files."}}