{"action":"created","comment":{"url":"https://api.github.com/repos/nodecg/nodecg/pulls/comments/211083588","pull_request_review_id":147438787,"id":211083588,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTA4MzU4OA==","diff_hunk":"@@ -0,0 +1,106 @@\n+import {IRouter, RequestHandler} from 'express-serve-static-core';\n+\n+import {Logger} from './logger';\n+import {ReplicantOptions, Replicant} from './replicant';\n+import {NodeCGConfig} from './config';\n+import {SendMessageReturnType} from './nodecg-static';\n+import {Platform} from './platform';\n+\n+interface NodeCGCommon<P extends Platform, M = SendMessageReturnType<P>> {\n+\tbundleName: string;\n+\tbundleConfig: any;\n+\tbundleVersion: string;\n+\treadonly bundleGit: {\n+\t\tbranch: string;\n+\t\thash: string;\n+\t\tshortHash: string;\n+\t\tdate?: Date;\n+\t\tmessage?: string;\n+\t};\n+\tLogger: typeof Logger;\n+\tlog: Logger;\n+\treadonly config: NodeCGConfig;\n+\tsendMessage(\n+\t\tmessageName: string,\n+\t\tcb?: (error: any, ...args: any[]) => void\n+\t): M;\n+\tsendMessage(\n+\t\tmessageName: string,\n+\t\tdata: any,\n+\t\tcb?: (error: any, ...args: any[]) => void\n+\t): M;\n+\tlistenFor(messageName: string, handlerFunc: (message: any) => void): void;\n+\tlistenFor(\n+\t\tmessageName: string,\n+\t\tbundleName: string,\n+\t\thandlerFunc: (message: any) => void","path":"types/lib/nodecg-instance.d.ts","position":36,"original_position":36,"commit_id":"89589f2cfb99e8962e7cb7fdb029129533512d59","original_commit_id":"89589f2cfb99e8962e7cb7fdb029129533512d59","user":{"login":"Lange","id":873012,"node_id":"MDQ6VXNlcjg3MzAxMg==","avatar_url":"https://avatars0.githubusercontent.com/u/873012?v=4","gravatar_id":"","url":"https://api.github.com/users/Lange","html_url":"https://github.com/Lange","followers_url":"https://api.github.com/users/Lange/followers","following_url":"https://api.github.com/users/Lange/following{/other_user}","gists_url":"https://api.github.com/users/Lange/gists{/gist_id}","starred_url":"https://api.github.com/users/Lange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lange/subscriptions","organizations_url":"https://api.github.com/users/Lange/orgs","repos_url":"https://api.github.com/users/Lange/repos","events_url":"https://api.github.com/users/Lange/events{/privacy}","received_events_url":"https://api.github.com/users/Lange/received_events","type":"User","site_admin":false},"body":"These `listenFor` typedefs do not include the `acknowledgement` callback. It is provided as the second arg to the callback (server-side only).","created_at":"2018-08-18T19:01:23Z","updated_at":"2018-08-18T19:01:23Z","html_url":"https://github.com/nodecg/nodecg/pull/432#discussion_r211083588","pull_request_url":"https://api.github.com/repos/nodecg/nodecg/pulls/432","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/comments/211083588"},"html":{"href":"https://github.com/nodecg/nodecg/pull/432#discussion_r211083588"},"pull_request":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/432"}}},"pull_request":{"url":"https://api.github.com/repos/nodecg/nodecg/pulls/432","id":205219920,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MjE5OTIw","html_url":"https://github.com/nodecg/nodecg/pull/432","diff_url":"https://github.com/nodecg/nodecg/pull/432.diff","patch_url":"https://github.com/nodecg/nodecg/pull/432.patch","issue_url":"https://api.github.com/repos/nodecg/nodecg/issues/432","number":432,"state":"open","locked":false,"title":"Add NodeCG API TypeScript Type Definition","user":{"login":"Hoishin","id":28832095,"node_id":"MDQ6VXNlcjI4ODMyMDk1","avatar_url":"https://avatars2.githubusercontent.com/u/28832095?v=4","gravatar_id":"","url":"https://api.github.com/users/Hoishin","html_url":"https://github.com/Hoishin","followers_url":"https://api.github.com/users/Hoishin/followers","following_url":"https://api.github.com/users/Hoishin/following{/other_user}","gists_url":"https://api.github.com/users/Hoishin/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoishin/subscriptions","organizations_url":"https://api.github.com/users/Hoishin/orgs","repos_url":"https://api.github.com/users/Hoishin/repos","events_url":"https://api.github.com/users/Hoishin/events{/privacy}","received_events_url":"https://api.github.com/users/Hoishin/received_events","type":"User","site_admin":false},"body":"TypeScript type definition for NodeCG's exposed API.\r\n\r\n`types/browser.d.ts` has type definitions for browsers, and `types/server.d.ts` for extensions. Refer to `test/types` for example usage.\r\n\r\nThis is not finalised yet. Looking for a good way to merge static interface and instance interface for `NodeCG` and `Replicant` so you don't have to import each one individually.\r\n\r\nI'd appreciate some reviews meanwhile for type definitions. I looked into mainly `lib/api.js`, but there may be wrong one.","created_at":"2018-07-31T19:37:48Z","updated_at":"2018-08-18T19:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aca8cadc212602ae3077b5cd85fdb0425e9e43f7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodecg/nodecg/pulls/432/commits","review_comments_url":"https://api.github.com/repos/nodecg/nodecg/pulls/432/comments","review_comment_url":"https://api.github.com/repos/nodecg/nodecg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodecg/nodecg/issues/432/comments","statuses_url":"https://api.github.com/repos/nodecg/nodecg/statuses/89589f2cfb99e8962e7cb7fdb029129533512d59","head":{"label":"Hoishin:add-typedef","ref":"add-typedef","sha":"89589f2cfb99e8962e7cb7fdb029129533512d59","user":{"login":"Hoishin","id":28832095,"node_id":"MDQ6VXNlcjI4ODMyMDk1","avatar_url":"https://avatars2.githubusercontent.com/u/28832095?v=4","gravatar_id":"","url":"https://api.github.com/users/Hoishin","html_url":"https://github.com/Hoishin","followers_url":"https://api.github.com/users/Hoishin/followers","following_url":"https://api.github.com/users/Hoishin/following{/other_user}","gists_url":"https://api.github.com/users/Hoishin/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoishin/subscriptions","organizations_url":"https://api.github.com/users/Hoishin/orgs","repos_url":"https://api.github.com/users/Hoishin/repos","events_url":"https://api.github.com/users/Hoishin/events{/privacy}","received_events_url":"https://api.github.com/users/Hoishin/received_events","type":"User","site_admin":false},"repo":{"id":115214074,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUyMTQwNzQ=","name":"nodecg","full_name":"Hoishin/nodecg","owner":{"login":"Hoishin","id":28832095,"node_id":"MDQ6VXNlcjI4ODMyMDk1","avatar_url":"https://avatars2.githubusercontent.com/u/28832095?v=4","gravatar_id":"","url":"https://api.github.com/users/Hoishin","html_url":"https://github.com/Hoishin","followers_url":"https://api.github.com/users/Hoishin/followers","following_url":"https://api.github.com/users/Hoishin/following{/other_user}","gists_url":"https://api.github.com/users/Hoishin/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoishin/subscriptions","organizations_url":"https://api.github.com/users/Hoishin/orgs","repos_url":"https://api.github.com/users/Hoishin/repos","events_url":"https://api.github.com/users/Hoishin/events{/privacy}","received_events_url":"https://api.github.com/users/Hoishin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hoishin/nodecg","description":"Create broadcast graphics using Node.js and a browser","fork":true,"url":"https://api.github.com/repos/Hoishin/nodecg","forks_url":"https://api.github.com/repos/Hoishin/nodecg/forks","keys_url":"https://api.github.com/repos/Hoishin/nodecg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hoishin/nodecg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hoishin/nodecg/teams","hooks_url":"https://api.github.com/repos/Hoishin/nodecg/hooks","issue_events_url":"https://api.github.com/repos/Hoishin/nodecg/issues/events{/number}","events_url":"https://api.github.com/repos/Hoishin/nodecg/events","assignees_url":"https://api.github.com/repos/Hoishin/nodecg/assignees{/user}","branches_url":"https://api.github.com/repos/Hoishin/nodecg/branches{/branch}","tags_url":"https://api.github.com/repos/Hoishin/nodecg/tags","blobs_url":"https://api.github.com/repos/Hoishin/nodecg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hoishin/nodecg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hoishin/nodecg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hoishin/nodecg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hoishin/nodecg/statuses/{sha}","languages_url":"https://api.github.com/repos/Hoishin/nodecg/languages","stargazers_url":"https://api.github.com/repos/Hoishin/nodecg/stargazers","contributors_url":"https://api.github.com/repos/Hoishin/nodecg/contributors","subscribers_url":"https://api.github.com/repos/Hoishin/nodecg/subscribers","subscription_url":"https://api.github.com/repos/Hoishin/nodecg/subscription","commits_url":"https://api.github.com/repos/Hoishin/nodecg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hoishin/nodecg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hoishin/nodecg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hoishin/nodecg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hoishin/nodecg/contents/{+path}","compare_url":"https://api.github.com/repos/Hoishin/nodecg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hoishin/nodecg/merges","archive_url":"https://api.github.com/repos/Hoishin/nodecg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hoishin/nodecg/downloads","issues_url":"https://api.github.com/repos/Hoishin/nodecg/issues{/number}","pulls_url":"https://api.github.com/repos/Hoishin/nodecg/pulls{/number}","milestones_url":"https://api.github.com/repos/Hoishin/nodecg/milestones{/number}","notifications_url":"https://api.github.com/repos/Hoishin/nodecg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hoishin/nodecg/labels{/name}","releases_url":"https://api.github.com/repos/Hoishin/nodecg/releases{/id}","deployments_url":"https://api.github.com/repos/Hoishin/nodecg/deployments","created_at":"2017-12-23T18:26:43Z","updated_at":"2018-07-31T19:06:10Z","pushed_at":"2018-08-18T12:14:47Z","git_url":"git://github.com/Hoishin/nodecg.git","ssh_url":"git@github.com:Hoishin/nodecg.git","clone_url":"https://github.com/Hoishin/nodecg.git","svn_url":"https://github.com/Hoishin/nodecg","homepage":"http://nodecg.com/","size":11636,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodecg:master","ref":"master","sha":"56d8bb7af9cae3a5e12c7e93aa0db7d0df1a33dc","user":{"login":"nodecg","id":7779117,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3NzkxMTc=","avatar_url":"https://avatars2.githubusercontent.com/u/7779117?v=4","gravatar_id":"","url":"https://api.github.com/users/nodecg","html_url":"https://github.com/nodecg","followers_url":"https://api.github.com/users/nodecg/followers","following_url":"https://api.github.com/users/nodecg/following{/other_user}","gists_url":"https://api.github.com/users/nodecg/gists{/gist_id}","starred_url":"https://api.github.com/users/nodecg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodecg/subscriptions","organizations_url":"https://api.github.com/users/nodecg/orgs","repos_url":"https://api.github.com/users/nodecg/repos","events_url":"https://api.github.com/users/nodecg/events{/privacy}","received_events_url":"https://api.github.com/users/nodecg/received_events","type":"Organization","site_admin":false},"repo":{"id":20268869,"node_id":"MDEwOlJlcG9zaXRvcnkyMDI2ODg2OQ==","name":"nodecg","full_name":"nodecg/nodecg","owner":{"login":"nodecg","id":7779117,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3NzkxMTc=","avatar_url":"https://avatars2.githubusercontent.com/u/7779117?v=4","gravatar_id":"","url":"https://api.github.com/users/nodecg","html_url":"https://github.com/nodecg","followers_url":"https://api.github.com/users/nodecg/followers","following_url":"https://api.github.com/users/nodecg/following{/other_user}","gists_url":"https://api.github.com/users/nodecg/gists{/gist_id}","starred_url":"https://api.github.com/users/nodecg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodecg/subscriptions","organizations_url":"https://api.github.com/users/nodecg/orgs","repos_url":"https://api.github.com/users/nodecg/repos","events_url":"https://api.github.com/users/nodecg/events{/privacy}","received_events_url":"https://api.github.com/users/nodecg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodecg/nodecg","description":"Create broadcast graphics using Node.js and a browser","fork":false,"url":"https://api.github.com/repos/nodecg/nodecg","forks_url":"https://api.github.com/repos/nodecg/nodecg/forks","keys_url":"https://api.github.com/repos/nodecg/nodecg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodecg/nodecg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodecg/nodecg/teams","hooks_url":"https://api.github.com/repos/nodecg/nodecg/hooks","issue_events_url":"https://api.github.com/repos/nodecg/nodecg/issues/events{/number}","events_url":"https://api.github.com/repos/nodecg/nodecg/events","assignees_url":"https://api.github.com/repos/nodecg/nodecg/assignees{/user}","branches_url":"https://api.github.com/repos/nodecg/nodecg/branches{/branch}","tags_url":"https://api.github.com/repos/nodecg/nodecg/tags","blobs_url":"https://api.github.com/repos/nodecg/nodecg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodecg/nodecg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodecg/nodecg/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodecg/nodecg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodecg/nodecg/statuses/{sha}","languages_url":"https://api.github.com/repos/nodecg/nodecg/languages","stargazers_url":"https://api.github.com/repos/nodecg/nodecg/stargazers","contributors_url":"https://api.github.com/repos/nodecg/nodecg/contributors","subscribers_url":"https://api.github.com/repos/nodecg/nodecg/subscribers","subscription_url":"https://api.github.com/repos/nodecg/nodecg/subscription","commits_url":"https://api.github.com/repos/nodecg/nodecg/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodecg/nodecg/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodecg/nodecg/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodecg/nodecg/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodecg/nodecg/contents/{+path}","compare_url":"https://api.github.com/repos/nodecg/nodecg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodecg/nodecg/merges","archive_url":"https://api.github.com/repos/nodecg/nodecg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodecg/nodecg/downloads","issues_url":"https://api.github.com/repos/nodecg/nodecg/issues{/number}","pulls_url":"https://api.github.com/repos/nodecg/nodecg/pulls{/number}","milestones_url":"https://api.github.com/repos/nodecg/nodecg/milestones{/number}","notifications_url":"https://api.github.com/repos/nodecg/nodecg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodecg/nodecg/labels{/name}","releases_url":"https://api.github.com/repos/nodecg/nodecg/releases{/id}","deployments_url":"https://api.github.com/repos/nodecg/nodecg/deployments","created_at":"2014-05-28T18:59:34Z","updated_at":"2018-08-15T14:32:10Z","pushed_at":"2018-08-18T12:10:42Z","git_url":"git://github.com/nodecg/nodecg.git","ssh_url":"git@github.com:nodecg/nodecg.git","clone_url":"https://github.com/nodecg/nodecg.git","svn_url":"https://github.com/nodecg/nodecg","homepage":"http://nodecg.com/","size":11406,"stargazers_count":446,"watchers_count":446,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":81,"open_issues":23,"watchers":446,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/432"},"html":{"href":"https://github.com/nodecg/nodecg/pull/432"},"issue":{"href":"https://api.github.com/repos/nodecg/nodecg/issues/432"},"comments":{"href":"https://api.github.com/repos/nodecg/nodecg/issues/432/comments"},"review_comments":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/432/comments"},"review_comment":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodecg/nodecg/pulls/432/commits"},"statuses":{"href":"https://api.github.com/repos/nodecg/nodecg/statuses/89589f2cfb99e8962e7cb7fdb029129533512d59"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Lange"}}