{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/36949053","id":36949053,"diff_hunk":"@@ -469,6 +469,33 @@ namespace ts {\n         }\r\n     }\r\n \r\n+    /**\r\n+     * Get the corresponding JSDocTag node if the position is in a jsDoc commet\r\n+     */\r\n+    export function getJsDocTagAtPosition(sourceFile: SourceFile, position: number): JSDocTag {\r\n+        let node = ts.getTokenAtPosition(sourceFile, position);\r\n+        let jsDocComment: JSDocComment;\r\n+        while (true) {\r\n+            if (node === sourceFile ||\r\n+                node.kind === SyntaxKind.VariableStatement ||\r\n+                node.kind === SyntaxKind.FunctionDeclaration ||\r\n+                node.kind === SyntaxKind.Parameter ||\r\n+                node.jsDocComment) {\r\n+                jsDocComment = node.jsDocComment;\r\n+                break;\r\n+            }\r\n+            node = node.parent;\r\n+        }\r\n+        if (jsDocComment) {\r\n+            for (let tag of jsDocComment.tags) {\r\n+                if (position >= tag.pos && position <= tag.end) {\r","path":"src/services/utilities.ts","position":23,"original_position":23,"commit_id":"ffaf8e08d9aa9623384e4eeff71a20203032a70a","original_commit_id":"ffaf8e08d9aa9623384e4eeff71a20203032a70a","user":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars.githubusercontent.com/u/972891?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"body":"`tag.pos <= position && position <= tag.end`","created_at":"2015-08-13T08:02:49Z","updated_at":"2015-08-13T08:02:49Z","html_url":"https://github.com/Microsoft/TypeScript/pull/4283#discussion_r36949053","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/36949053"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/4283#discussion_r36949053"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283","id":42210138,"html_url":"https://github.com/Microsoft/TypeScript/pull/4283","diff_url":"https://github.com/Microsoft/TypeScript/pull/4283.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/4283.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4283","number":4283,"state":"open","locked":false,"title":"Add Intellisense to JsDoc","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"body":"This PR provides completion list for the following cases:\r\n- List all the JsDoc tag names right after the ``@`` sign or in the tagname, e.g.:\r\n```javascript\r\n/** @^ */\r\nvar foo = ...\r\n```\r\nand \r\n```javascript\r\n/** @pa^ */\r\nvar foo = ...\r\n```\r\n- Full intellisense in certain JsDoc tag braces,  e.g.:\r\n```javascript\r\n/** @type { numbe^ } */\r\nvar foo = ...\r\n```\r\n```javascript\r\n/** @param { numbe^ } bar */\r\nvar foo = ...\r\n```\r\n\r\nThe initial implementation only applies to js files, as currently the parser stores the ``JSDocComment`` nodes in the tree for js files but not ts files. Support for ts files may need some discussion.","created_at":"2015-08-12T07:07:01Z","updated_at":"2015-08-13T08:02:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29960dc06350f4524e7e68c38a465760073af972","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4283/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/ffaf8e08d9aa9623384e4eeff71a20203032a70a","head":{"label":"zhengbli:JsDocIntellisense2","ref":"JsDocIntellisense2","sha":"ffaf8e08d9aa9623384e4eeff71a20203032a70a","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"repo":{"id":31636477,"name":"TypeScript","full_name":"zhengbli/TypeScript","owner":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhengbli/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":true,"url":"https://api.github.com/repos/zhengbli/TypeScript","forks_url":"https://api.github.com/repos/zhengbli/TypeScript/forks","keys_url":"https://api.github.com/repos/zhengbli/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhengbli/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhengbli/TypeScript/teams","hooks_url":"https://api.github.com/repos/zhengbli/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/zhengbli/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/zhengbli/TypeScript/events","assignees_url":"https://api.github.com/repos/zhengbli/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/zhengbli/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/zhengbli/TypeScript/tags","blobs_url":"https://api.github.com/repos/zhengbli/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhengbli/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhengbli/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhengbli/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhengbli/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/zhengbli/TypeScript/languages","stargazers_url":"https://api.github.com/repos/zhengbli/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/zhengbli/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/zhengbli/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/zhengbli/TypeScript/subscription","commits_url":"https://api.github.com/repos/zhengbli/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhengbli/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhengbli/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhengbli/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhengbli/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/zhengbli/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhengbli/TypeScript/merges","archive_url":"https://api.github.com/repos/zhengbli/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhengbli/TypeScript/downloads","issues_url":"https://api.github.com/repos/zhengbli/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/zhengbli/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/zhengbli/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/zhengbli/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhengbli/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/zhengbli/TypeScript/releases{/id}","created_at":"2015-03-04T03:41:12Z","updated_at":"2015-05-05T17:16:07Z","pushed_at":"2015-08-12T06:56:40Z","git_url":"git://github.com/zhengbli/TypeScript.git","ssh_url":"git@github.com:zhengbli/TypeScript.git","clone_url":"https://github.com/zhengbli/TypeScript.git","svn_url":"https://github.com/zhengbli/TypeScript","homepage":"http://www.typescriptlang.org","size":192494,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"7c8da422302d4e46bdb38547a1e107df534173df","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":20929025,"name":"TypeScript","full_name":"Microsoft/TypeScript","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":false,"url":"https://api.github.com/repos/Microsoft/TypeScript","forks_url":"https://api.github.com/repos/Microsoft/TypeScript/forks","keys_url":"https://api.github.com/repos/Microsoft/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/TypeScript/teams","hooks_url":"https://api.github.com/repos/Microsoft/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/TypeScript/events","assignees_url":"https://api.github.com/repos/Microsoft/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/TypeScript/tags","blobs_url":"https://api.github.com/repos/Microsoft/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/TypeScript/languages","stargazers_url":"https://api.github.com/repos/Microsoft/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/TypeScript/subscription","commits_url":"https://api.github.com/repos/Microsoft/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/TypeScript/merges","archive_url":"https://api.github.com/repos/Microsoft/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/TypeScript/downloads","issues_url":"https://api.github.com/repos/Microsoft/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/TypeScript/releases{/id}","created_at":"2014-06-17T15:28:39Z","updated_at":"2015-08-13T07:24:59Z","pushed_at":"2015-08-13T01:54:36Z","git_url":"git://github.com/Microsoft/TypeScript.git","ssh_url":"git@github.com:Microsoft/TypeScript.git","clone_url":"https://github.com/Microsoft/TypeScript.git","svn_url":"https://github.com/Microsoft/TypeScript","homepage":"http://www.typescriptlang.org","size":961461,"stargazers_count":6322,"watchers_count":6322,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":696,"mirror_url":null,"open_issues_count":721,"forks":696,"open_issues":721,"watchers":6322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/4283"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/4283"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/4283/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/4283/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/ffaf8e08d9aa9623384e4eeff71a20203032a70a"}}}}