{"action":"opened","number":232,"pull_request":{"url":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232","id":91235490,"html_url":"https://github.com/vitaly-t/pg-promise/pull/232","diff_url":"https://github.com/vitaly-t/pg-promise/pull/232.diff","patch_url":"https://github.com/vitaly-t/pg-promise/pull/232.patch","issue_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/232","number":232,"state":"open","locked":false,"title":"typescript 2 support - @types","user":{"login":"mauriciovigolo","id":676270,"avatar_url":"https://avatars.githubusercontent.com/u/676270?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciovigolo","html_url":"https://github.com/mauriciovigolo","followers_url":"https://api.github.com/users/mauriciovigolo/followers","following_url":"https://api.github.com/users/mauriciovigolo/following{/other_user}","gists_url":"https://api.github.com/users/mauriciovigolo/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciovigolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciovigolo/subscriptions","organizations_url":"https://api.github.com/users/mauriciovigolo/orgs","repos_url":"https://api.github.com/users/mauriciovigolo/repos","events_url":"https://api.github.com/users/mauriciovigolo/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciovigolo/received_events","type":"User","site_admin":false},"body":"Hi Vitaly,\r\n\r\nI modified the structure of the Typescript definitions files and it didn't require too many modifications. I've been testing in our projects and it's working perfectly.\r\n\r\nFor using it, it's necessary to update to the 2nd version of typescript (global and local), update the tsconfig.json, to include the typeRoots value and also remove the previous typings setups - if the project is using it. Ex:\r\n\r\n```\r\n{\r\n   \"compilerOptions\": {\r\n        \"module\": \"commonjs\",\r\n        \"target\": \"es6\",\r\n        \"rootDir\": \".\",\r\n        \"sourceMap\": true,\r\n        \"emitDecoratorMetadata\": true,\r\n        \"experimentalDecorators\": true,\r\n        \"removeComments\": false,\r\n        \"noImplicitAny\": false,\r\n        \"moduleResolution\": \"node\",\r\n        \"typeRoots\": [\r\n            \"node_modules/@types/\"\r\n        ]\r\n    }\r\n}\r\n```\r\n\r\nAfter this, copy the definitions files folders from pg-promise to the @types folder, inside of node_modules -- as it isn't at the [@types repo](https://www.npmjs.com/~types) yet. You also must copy the spex and pg-monitor (if used by the project) - I just did a pull request for both also. Install the rest of definitions files from @types and it's done.\r\n\r\nI didn't update the documentation, as I would like to see if you accept this pull request.\r\n\r\nIf it's okay, could you upload at the typescript ~types repo? Then we could install using \r\n```npm i @types/pg-promise```\r\n\r\nThanks! \r\n","created_at":"2016-10-27T16:24:48Z","updated_at":"2016-10-27T16:24:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232/commits","review_comments_url":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232/comments","review_comment_url":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/232/comments","statuses_url":"https://api.github.com/repos/vitaly-t/pg-promise/statuses/129c15b65363bb2b3b3f295175fb5cb596b97c58","head":{"label":"mauriciovigolo:master","ref":"master","sha":"129c15b65363bb2b3b3f295175fb5cb596b97c58","user":{"login":"mauriciovigolo","id":676270,"avatar_url":"https://avatars.githubusercontent.com/u/676270?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciovigolo","html_url":"https://github.com/mauriciovigolo","followers_url":"https://api.github.com/users/mauriciovigolo/followers","following_url":"https://api.github.com/users/mauriciovigolo/following{/other_user}","gists_url":"https://api.github.com/users/mauriciovigolo/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciovigolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciovigolo/subscriptions","organizations_url":"https://api.github.com/users/mauriciovigolo/orgs","repos_url":"https://api.github.com/users/mauriciovigolo/repos","events_url":"https://api.github.com/users/mauriciovigolo/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciovigolo/received_events","type":"User","site_admin":false},"repo":{"id":72123399,"name":"pg-promise","full_name":"mauriciovigolo/pg-promise","owner":{"login":"mauriciovigolo","id":676270,"avatar_url":"https://avatars.githubusercontent.com/u/676270?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciovigolo","html_url":"https://github.com/mauriciovigolo","followers_url":"https://api.github.com/users/mauriciovigolo/followers","following_url":"https://api.github.com/users/mauriciovigolo/following{/other_user}","gists_url":"https://api.github.com/users/mauriciovigolo/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciovigolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciovigolo/subscriptions","organizations_url":"https://api.github.com/users/mauriciovigolo/orgs","repos_url":"https://api.github.com/users/mauriciovigolo/repos","events_url":"https://api.github.com/users/mauriciovigolo/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciovigolo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mauriciovigolo/pg-promise","description":":elephant: Promises/A+ interface for PostgreSQL","fork":true,"url":"https://api.github.com/repos/mauriciovigolo/pg-promise","forks_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/forks","keys_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/teams","hooks_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/hooks","issue_events_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/issues/events{/number}","events_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/events","assignees_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/assignees{/user}","branches_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/branches{/branch}","tags_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/tags","blobs_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/git/refs{/sha}","trees_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/statuses/{sha}","languages_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/languages","stargazers_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/stargazers","contributors_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/contributors","subscribers_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/subscribers","subscription_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/subscription","commits_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/commits{/sha}","git_commits_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/git/commits{/sha}","comments_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/comments{/number}","issue_comment_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/issues/comments{/number}","contents_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/contents/{+path}","compare_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/merges","archive_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/downloads","issues_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/issues{/number}","pulls_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/pulls{/number}","milestones_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/milestones{/number}","notifications_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/labels{/name}","releases_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/releases{/id}","deployments_url":"https://api.github.com/repos/mauriciovigolo/pg-promise/deployments","created_at":"2016-10-27T15:44:55Z","updated_at":"2016-10-27T15:44:57Z","pushed_at":"2016-10-27T15:45:29Z","git_url":"git://github.com/mauriciovigolo/pg-promise.git","ssh_url":"git@github.com:mauriciovigolo/pg-promise.git","clone_url":"https://github.com/mauriciovigolo/pg-promise.git","svn_url":"https://github.com/mauriciovigolo/pg-promise","homepage":"","size":4327,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vitaly-t:master","ref":"master","sha":"5beb5565b1c7a8544433db2da3ca798070b625f6","user":{"login":"vitaly-t","id":5108906,"avatar_url":"https://avatars.githubusercontent.com/u/5108906?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-t","html_url":"https://github.com/vitaly-t","followers_url":"https://api.github.com/users/vitaly-t/followers","following_url":"https://api.github.com/users/vitaly-t/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-t/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-t/subscriptions","organizations_url":"https://api.github.com/users/vitaly-t/orgs","repos_url":"https://api.github.com/users/vitaly-t/repos","events_url":"https://api.github.com/users/vitaly-t/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-t/received_events","type":"User","site_admin":false},"repo":{"id":31632536,"name":"pg-promise","full_name":"vitaly-t/pg-promise","owner":{"login":"vitaly-t","id":5108906,"avatar_url":"https://avatars.githubusercontent.com/u/5108906?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-t","html_url":"https://github.com/vitaly-t","followers_url":"https://api.github.com/users/vitaly-t/followers","following_url":"https://api.github.com/users/vitaly-t/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-t/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-t/subscriptions","organizations_url":"https://api.github.com/users/vitaly-t/orgs","repos_url":"https://api.github.com/users/vitaly-t/repos","events_url":"https://api.github.com/users/vitaly-t/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-t/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vitaly-t/pg-promise","description":":elephant: Promises/A+ interface for PostgreSQL","fork":false,"url":"https://api.github.com/repos/vitaly-t/pg-promise","forks_url":"https://api.github.com/repos/vitaly-t/pg-promise/forks","keys_url":"https://api.github.com/repos/vitaly-t/pg-promise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitaly-t/pg-promise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitaly-t/pg-promise/teams","hooks_url":"https://api.github.com/repos/vitaly-t/pg-promise/hooks","issue_events_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/events{/number}","events_url":"https://api.github.com/repos/vitaly-t/pg-promise/events","assignees_url":"https://api.github.com/repos/vitaly-t/pg-promise/assignees{/user}","branches_url":"https://api.github.com/repos/vitaly-t/pg-promise/branches{/branch}","tags_url":"https://api.github.com/repos/vitaly-t/pg-promise/tags","blobs_url":"https://api.github.com/repos/vitaly-t/pg-promise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitaly-t/pg-promise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitaly-t/pg-promise/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitaly-t/pg-promise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitaly-t/pg-promise/statuses/{sha}","languages_url":"https://api.github.com/repos/vitaly-t/pg-promise/languages","stargazers_url":"https://api.github.com/repos/vitaly-t/pg-promise/stargazers","contributors_url":"https://api.github.com/repos/vitaly-t/pg-promise/contributors","subscribers_url":"https://api.github.com/repos/vitaly-t/pg-promise/subscribers","subscription_url":"https://api.github.com/repos/vitaly-t/pg-promise/subscription","commits_url":"https://api.github.com/repos/vitaly-t/pg-promise/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitaly-t/pg-promise/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitaly-t/pg-promise/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitaly-t/pg-promise/contents/{+path}","compare_url":"https://api.github.com/repos/vitaly-t/pg-promise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitaly-t/pg-promise/merges","archive_url":"https://api.github.com/repos/vitaly-t/pg-promise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitaly-t/pg-promise/downloads","issues_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues{/number}","pulls_url":"https://api.github.com/repos/vitaly-t/pg-promise/pulls{/number}","milestones_url":"https://api.github.com/repos/vitaly-t/pg-promise/milestones{/number}","notifications_url":"https://api.github.com/repos/vitaly-t/pg-promise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitaly-t/pg-promise/labels{/name}","releases_url":"https://api.github.com/repos/vitaly-t/pg-promise/releases{/id}","deployments_url":"https://api.github.com/repos/vitaly-t/pg-promise/deployments","created_at":"2015-03-04T02:00:34Z","updated_at":"2016-10-27T10:07:49Z","pushed_at":"2016-10-27T16:24:49Z","git_url":"git://github.com/vitaly-t/pg-promise.git","ssh_url":"git@github.com:vitaly-t/pg-promise.git","clone_url":"https://github.com/vitaly-t/pg-promise.git","svn_url":"https://github.com/vitaly-t/pg-promise","homepage":"","size":4327,"stargazers_count":887,"watchers_count":887,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":58,"mirror_url":null,"open_issues_count":5,"forks":58,"open_issues":5,"watchers":887,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232"},"html":{"href":"https://github.com/vitaly-t/pg-promise/pull/232"},"issue":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/issues/232"},"comments":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/vitaly-t/pg-promise/statuses/129c15b65363bb2b3b3f295175fb5cb596b97c58"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":862,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"mauriciovigolo"}}