{"action":"created","comment":{"url":"https://api.github.com/repos/angular/sickle/pulls/comments/43979856","id":43979856,"diff_hunk":"@@ -58,10 +62,49 @@ class Annotator {\n         this.maybeVisitType((<ts.VariableDeclaration>node).type);\n         this.writeNode(node);\n         break;\n+      case ts.SyntaxKind.ClassDeclaration: {\n+        let classNode = <ts.ClassDeclaration>node;\n+        let hasCtor = classNode.members.some((e) => e.kind === ts.SyntaxKind.Constructor);\n+        if (hasCtor) {\n+          this.writeNode(classNode);\n+          break;\n+        }\n+        // Emit a synthetic ctor.\n+        // TODO(martinprobst): Handle inherited parent ctors.\n+        this.writeTextBetween(classNode, classNode.getFullStart(), classNode.getLastToken());\n+        this.emit('constructor() {\\n');\n+        this.emitStubDeclarations(classNode, []);\n+        this.emit('}\\n');\n+        this.writeNode(classNode.getLastToken());\n+        break;\n+      }\n+      case ts.SyntaxKind.Constructor: {\n+        let ctor = <ts.ConstructorDeclaration>node;\n+        this.writeTextBetween(ctor, ctor.getFullStart(), ctor.body);\n+        if (ctor.body.statements.length) {\n+          this.writeTextBetween(ctor.body, ctor.body.getFullStart(), ctor.body.statements[0]);\n+        } else {\n+          this.emit(' {');\n+        }\n+\n+        let paramProps = ctor.parameters.filter((p) => !!(p.flags & VISIBILITY_FLAGS));","path":"src/sickle.ts","position":62,"original_position":62,"commit_id":"ffdde641f57fcd7cbf77757befa930e270aa1940","original_commit_id":"ffdde641f57fcd7cbf77757befa930e270aa1940","user":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"body":"how about transfering the visibility info too, not just using it for filtering? Are there any complications?","created_at":"2015-11-05T06:23:32Z","updated_at":"2015-11-05T06:23:32Z","html_url":"https://github.com/angular/sickle/pull/2#discussion_r43979856","pull_request_url":"https://api.github.com/repos/angular/sickle/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/angular/sickle/pulls/comments/43979856"},"html":{"href":"https://github.com/angular/sickle/pull/2#discussion_r43979856"},"pull_request":{"href":"https://api.github.com/repos/angular/sickle/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/angular/sickle/pulls/2","id":49423022,"html_url":"https://github.com/angular/sickle/pull/2","diff_url":"https://github.com/angular/sickle/pull/2.diff","patch_url":"https://github.com/angular/sickle/pull/2.patch","issue_url":"https://api.github.com/repos/angular/sickle/issues/2","number":2,"state":"open","locked":false,"title":"Support Fields","user":{"login":"mprobst","id":7208,"avatar_url":"https://avatars.githubusercontent.com/u/7208?v=3","gravatar_id":"","url":"https://api.github.com/users/mprobst","html_url":"https://github.com/mprobst","followers_url":"https://api.github.com/users/mprobst/followers","following_url":"https://api.github.com/users/mprobst/following{/other_user}","gists_url":"https://api.github.com/users/mprobst/gists{/gist_id}","starred_url":"https://api.github.com/users/mprobst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprobst/subscriptions","organizations_url":"https://api.github.com/users/mprobst/orgs","repos_url":"https://api.github.com/users/mprobst/repos","events_url":"https://api.github.com/users/mprobst/events{/privacy}","received_events_url":"https://api.github.com/users/mprobst/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-02T11:53:06Z","updated_at":"2015-11-05T06:23:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a16f68e1ef703ce2f1aad9d9798b780e65692acf","assignee":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/sickle/pulls/2/commits","review_comments_url":"https://api.github.com/repos/angular/sickle/pulls/2/comments","review_comment_url":"https://api.github.com/repos/angular/sickle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/sickle/issues/2/comments","statuses_url":"https://api.github.com/repos/angular/sickle/statuses/ffdde641f57fcd7cbf77757befa930e270aa1940","head":{"label":"angular:fields","ref":"fields","sha":"ffdde641f57fcd7cbf77757befa930e270aa1940","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":43722735,"name":"sickle","full_name":"angular/sickle","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/sickle","description":"Tickle - TypeScript to Closure Annotator","fork":false,"url":"https://api.github.com/repos/angular/sickle","forks_url":"https://api.github.com/repos/angular/sickle/forks","keys_url":"https://api.github.com/repos/angular/sickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/sickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/sickle/teams","hooks_url":"https://api.github.com/repos/angular/sickle/hooks","issue_events_url":"https://api.github.com/repos/angular/sickle/issues/events{/number}","events_url":"https://api.github.com/repos/angular/sickle/events","assignees_url":"https://api.github.com/repos/angular/sickle/assignees{/user}","branches_url":"https://api.github.com/repos/angular/sickle/branches{/branch}","tags_url":"https://api.github.com/repos/angular/sickle/tags","blobs_url":"https://api.github.com/repos/angular/sickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/sickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/sickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/sickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/sickle/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/sickle/languages","stargazers_url":"https://api.github.com/repos/angular/sickle/stargazers","contributors_url":"https://api.github.com/repos/angular/sickle/contributors","subscribers_url":"https://api.github.com/repos/angular/sickle/subscribers","subscription_url":"https://api.github.com/repos/angular/sickle/subscription","commits_url":"https://api.github.com/repos/angular/sickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/sickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/sickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/sickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/sickle/contents/{+path}","compare_url":"https://api.github.com/repos/angular/sickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/sickle/merges","archive_url":"https://api.github.com/repos/angular/sickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/sickle/downloads","issues_url":"https://api.github.com/repos/angular/sickle/issues{/number}","pulls_url":"https://api.github.com/repos/angular/sickle/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/sickle/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/sickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/sickle/labels{/name}","releases_url":"https://api.github.com/repos/angular/sickle/releases{/id}","created_at":"2015-10-06T00:55:40Z","updated_at":"2015-10-12T17:22:09Z","pushed_at":"2015-11-04T12:20:33Z","git_url":"git://github.com/angular/sickle.git","ssh_url":"git@github.com:angular/sickle.git","clone_url":"https://github.com/angular/sickle.git","svn_url":"https://github.com/angular/sickle","homepage":null,"size":208,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"36b8651c82f8d220ad890f7b418f5137028fdc6b","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":43722735,"name":"sickle","full_name":"angular/sickle","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/sickle","description":"Tickle - TypeScript to Closure Annotator","fork":false,"url":"https://api.github.com/repos/angular/sickle","forks_url":"https://api.github.com/repos/angular/sickle/forks","keys_url":"https://api.github.com/repos/angular/sickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/sickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/sickle/teams","hooks_url":"https://api.github.com/repos/angular/sickle/hooks","issue_events_url":"https://api.github.com/repos/angular/sickle/issues/events{/number}","events_url":"https://api.github.com/repos/angular/sickle/events","assignees_url":"https://api.github.com/repos/angular/sickle/assignees{/user}","branches_url":"https://api.github.com/repos/angular/sickle/branches{/branch}","tags_url":"https://api.github.com/repos/angular/sickle/tags","blobs_url":"https://api.github.com/repos/angular/sickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/sickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/sickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/sickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/sickle/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/sickle/languages","stargazers_url":"https://api.github.com/repos/angular/sickle/stargazers","contributors_url":"https://api.github.com/repos/angular/sickle/contributors","subscribers_url":"https://api.github.com/repos/angular/sickle/subscribers","subscription_url":"https://api.github.com/repos/angular/sickle/subscription","commits_url":"https://api.github.com/repos/angular/sickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/sickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/sickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/sickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/sickle/contents/{+path}","compare_url":"https://api.github.com/repos/angular/sickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/sickle/merges","archive_url":"https://api.github.com/repos/angular/sickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/sickle/downloads","issues_url":"https://api.github.com/repos/angular/sickle/issues{/number}","pulls_url":"https://api.github.com/repos/angular/sickle/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/sickle/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/sickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/sickle/labels{/name}","releases_url":"https://api.github.com/repos/angular/sickle/releases{/id}","created_at":"2015-10-06T00:55:40Z","updated_at":"2015-10-12T17:22:09Z","pushed_at":"2015-11-04T12:20:33Z","git_url":"git://github.com/angular/sickle.git","ssh_url":"git@github.com:angular/sickle.git","clone_url":"https://github.com/angular/sickle.git","svn_url":"https://github.com/angular/sickle","homepage":null,"size":208,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/sickle/pulls/2"},"html":{"href":"https://github.com/angular/sickle/pull/2"},"issue":{"href":"https://api.github.com/repos/angular/sickle/issues/2"},"comments":{"href":"https://api.github.com/repos/angular/sickle/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/sickle/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/sickle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/sickle/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/angular/sickle/statuses/ffdde641f57fcd7cbf77757befa930e270aa1940"}}}}