{"action":"created","issue":{"url":"https://api.github.com/repos/pillarjs/path-match/issues/5","repository_url":"https://api.github.com/repos/pillarjs/path-match","labels_url":"https://api.github.com/repos/pillarjs/path-match/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/pillarjs/path-match/issues/5/comments","events_url":"https://api.github.com/repos/pillarjs/path-match/issues/5/events","html_url":"https://github.com/pillarjs/path-match/pull/5","id":221980828,"number":5,"title":"Add TypeScript definitions","user":{"login":"pscanf","id":3725458,"avatar_url":"https://avatars3.githubusercontent.com/u/3725458?v=3","gravatar_id":"","url":"https://api.github.com/users/pscanf","html_url":"https://github.com/pscanf","followers_url":"https://api.github.com/users/pscanf/followers","following_url":"https://api.github.com/users/pscanf/following{/other_user}","gists_url":"https://api.github.com/users/pscanf/gists{/gist_id}","starred_url":"https://api.github.com/users/pscanf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pscanf/subscriptions","organizations_url":"https://api.github.com/users/pscanf/orgs","repos_url":"https://api.github.com/users/pscanf/repos","events_url":"https://api.github.com/users/pscanf/events{/privacy}","received_events_url":"https://api.github.com/users/pscanf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-16T00:14:26Z","updated_at":"2017-04-20T21:48:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pillarjs/path-match/pulls/5","html_url":"https://github.com/pillarjs/path-match/pull/5","diff_url":"https://github.com/pillarjs/path-match/pull/5.diff","patch_url":"https://github.com/pillarjs/path-match/pull/5.patch"},"body":"(Also updates dependencies since the david-dm badge is showing them as out-of-date)\r\n\r\nA couple of notes:\r\n\r\n* the signature for `MatchFunction` is not 100% correct for a couple of reasons:\r\n  * if I pass `true` (or a string, a non-zero number etc) as second argument, I don't get back a `ParamsObject`, but rather the same thing I passed in. I would qualify this as an \"undefined behaviour\" of the function when it's invoked with a second argument that doesn't make much sense, hence my choice to type the second argument as [`object`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#object-type)\r\n  * I typed its return value as a `string -> string | string[]` map, even though, if I pass as second argument a \"complex object\", I get in return that object decorated with the parameters keys/values. The only way to type it correctly would be to use the `object` type or even `any`, but I thought that in the majority of use cases the `ParamsMap` type would be more useful\r\n\r\n* as per the conversation in pillarjs/path-to-regexp#72, I \"ported\" the test file to TypeScript and used `ts-node` to run it (adding the appropriate dev-dependencies)\r\n\r\nHope it's a welcome contribution 🙂 "},"comment":{"url":"https://api.github.com/repos/pillarjs/path-match/issues/comments/295929588","html_url":"https://github.com/pillarjs/path-match/pull/5#issuecomment-295929588","issue_url":"https://api.github.com/repos/pillarjs/path-match/issues/5","id":295929588,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars2.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-04-20T21:48:46Z","updated_at":"2017-04-20T21:48:46Z","body":"\n[![Coverage Status](https://coveralls.io/builds/11173133/badge)](https://coveralls.io/builds/11173133)\n\nCoverage remained the same at 100.0% when pulling **341acbc7c9fa2e1e7ae5acc05fcfa87eca6c0c05 on pscanf:master** into **f461d324572404943fbde1562dddee6e03fe383c on pillarjs:master**.\n"}}
{"actor":{"display_login":"coveralls"}}