{"action":"created","comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments/68349000","id":68349000,"diff_hunk":"@@ -269,14 +273,42 @@ declare module \"mongoose\" {\n     path(path: string, constructor: any): Schema;\n     pathType(path: string): string;\n     plugin(plugin: (schema: Schema, options?: Object) => void, options?: Object): Schema;\n-    post(method: string, fn: Function): Schema;\n-    pre(method: string, callback: Function): Schema;\n+\n+    pre(method: string, fn: HookSyncCallback): Schema;\n+    pre(method: string, fn: HookSyncCallback, errorCb: HookErrorCallback): Schema;\n+    pre(method: string, isAsync: boolean, fn: HookAsyncCallback): Schema;\n+    pre(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb: HookErrorCallback): Schema;\n+    post(method: string, fn: HookSyncCallback): Schema;\n+    post(method: string, fn: HookSyncCallback, errorCb: HookErrorCallback): Schema;\n+    post(method: string, isAsync: boolean, fn: HookAsyncCallback): Schema;\n+    post(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb: HookErrorCallback): Schema;\n+\n     requiredPaths(): string[];\n     set(key: string, value: any): void;\n     static(name: string, fn: Function): Schema;\n     virtual(name: string, options?: Object): VirtualType;\n     virtualpath(name: string): VirtualType;\n+\n+  }\n+\n+  // hook functions: https://github.com/vkarpov15/hooks-fixed\n+  export interface HookSyncCallback {\n+      (next: Function, ...hookArgs:any[]): any;\n   }\n+\n+  export interface HookAsyncCallback {\n+      (next: Function, done: Function, ...hookArgs:any[]): any;\n+  }\n+\n+  export interface HookErrorCallback {\n+      (error: Error): any;\n+  }\n+\n+  export interface HookNextFunction {","path":"mongoose/mongoose.d.ts","position":44,"original_position":48,"commit_id":"54b329f9da2618d55835a0f70680c7491cdc77a5","original_commit_id":"8d887006013561328559fa513e6590cc634e889e","user":{"login":"frogcjn","id":1777562,"avatar_url":"https://avatars.githubusercontent.com/u/1777562?v=3","gravatar_id":"","url":"https://api.github.com/users/frogcjn","html_url":"https://github.com/frogcjn","followers_url":"https://api.github.com/users/frogcjn/followers","following_url":"https://api.github.com/users/frogcjn/following{/other_user}","gists_url":"https://api.github.com/users/frogcjn/gists{/gist_id}","starred_url":"https://api.github.com/users/frogcjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogcjn/subscriptions","organizations_url":"https://api.github.com/users/frogcjn/orgs","repos_url":"https://api.github.com/users/frogcjn/repos","events_url":"https://api.github.com/users/frogcjn/events{/privacy}","received_events_url":"https://api.github.com/users/frogcjn/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2016-06-24T03:17:46Z","updated_at":"2016-06-24T03:17:46Z","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794#discussion_r68349000","pull_request_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794","_links":{"self":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments/68349000"},"html":{"href":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794#discussion_r68349000"},"pull_request":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794"}}},"pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794","id":75056687,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794.patch","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/9794","number":9794,"state":"open","locked":false,"title":"Mongoose - improve Schema type information","user":{"login":"frogcjn","id":1777562,"avatar_url":"https://avatars.githubusercontent.com/u/1777562?v=3","gravatar_id":"","url":"https://api.github.com/users/frogcjn","html_url":"https://github.com/frogcjn","followers_url":"https://api.github.com/users/frogcjn/followers","following_url":"https://api.github.com/users/frogcjn/following{/other_user}","gists_url":"https://api.github.com/users/frogcjn/gists{/gist_id}","starred_url":"https://api.github.com/users/frogcjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogcjn/subscriptions","organizations_url":"https://api.github.com/users/frogcjn/orgs","repos_url":"https://api.github.com/users/frogcjn/repos","events_url":"https://api.github.com/users/frogcjn/events{/privacy}","received_events_url":"https://api.github.com/users/frogcjn/received_events","type":"User","site_admin":false},"body":"1. Add details on `pre` and `post` on Schema\r\nMongoose use `hooks-fixed` package to add hook methods, and should be added some detailed callback information.\r\nSee https://github.com/vkarpov15/hooks-fixed\r\n2. Add `static` and `methods` on Schema\r\nSee http://mongoosejs.com/docs/2.7.x/docs/methods-statics.html","created_at":"2016-06-24T02:36:37Z","updated_at":"2016-06-24T03:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39eac56e4d8d968ed3baa556e89df03756803394","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794/commits","review_comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794/comments","review_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/9794/comments","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/54b329f9da2618d55835a0f70680c7491cdc77a5","head":{"label":"frogcjn:master","ref":"master","sha":"54b329f9da2618d55835a0f70680c7491cdc77a5","user":{"login":"frogcjn","id":1777562,"avatar_url":"https://avatars.githubusercontent.com/u/1777562?v=3","gravatar_id":"","url":"https://api.github.com/users/frogcjn","html_url":"https://github.com/frogcjn","followers_url":"https://api.github.com/users/frogcjn/followers","following_url":"https://api.github.com/users/frogcjn/following{/other_user}","gists_url":"https://api.github.com/users/frogcjn/gists{/gist_id}","starred_url":"https://api.github.com/users/frogcjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogcjn/subscriptions","organizations_url":"https://api.github.com/users/frogcjn/orgs","repos_url":"https://api.github.com/users/frogcjn/repos","events_url":"https://api.github.com/users/frogcjn/events{/privacy}","received_events_url":"https://api.github.com/users/frogcjn/received_events","type":"User","site_admin":false},"repo":{"id":61849736,"name":"DefinitelyTyped","full_name":"frogcjn/DefinitelyTyped","owner":{"login":"frogcjn","id":1777562,"avatar_url":"https://avatars.githubusercontent.com/u/1777562?v=3","gravatar_id":"","url":"https://api.github.com/users/frogcjn","html_url":"https://github.com/frogcjn","followers_url":"https://api.github.com/users/frogcjn/followers","following_url":"https://api.github.com/users/frogcjn/following{/other_user}","gists_url":"https://api.github.com/users/frogcjn/gists{/gist_id}","starred_url":"https://api.github.com/users/frogcjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogcjn/subscriptions","organizations_url":"https://api.github.com/users/frogcjn/orgs","repos_url":"https://api.github.com/users/frogcjn/repos","events_url":"https://api.github.com/users/frogcjn/events{/privacy}","received_events_url":"https://api.github.com/users/frogcjn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frogcjn/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":true,"url":"https://api.github.com/repos/frogcjn/DefinitelyTyped","forks_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/frogcjn/DefinitelyTyped/deployments","created_at":"2016-06-24T02:05:12Z","updated_at":"2016-06-24T02:05:19Z","pushed_at":"2016-06-24T03:16:12Z","git_url":"git://github.com/frogcjn/DefinitelyTyped.git","ssh_url":"git@github.com:frogcjn/DefinitelyTyped.git","clone_url":"https://github.com/frogcjn/DefinitelyTyped.git","svn_url":"https://github.com/frogcjn/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":147099,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"DefinitelyTyped:master","ref":"master","sha":"312f5f6bc23932c3cb1dd71e3a5fa425cebd3ee6","user":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars.githubusercontent.com/u/3637556?v=3","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"repo":{"id":6093316,"name":"DefinitelyTyped","full_name":"DefinitelyTyped/DefinitelyTyped","owner":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars.githubusercontent.com/u/3637556?v=3","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":false,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","forks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/deployments","created_at":"2012-10-05T16:39:45Z","updated_at":"2016-06-24T01:27:06Z","pushed_at":"2016-06-24T03:16:46Z","git_url":"git://github.com/DefinitelyTyped/DefinitelyTyped.git","ssh_url":"git@github.com:DefinitelyTyped/DefinitelyTyped.git","clone_url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","svn_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":147099,"stargazers_count":7436,"watchers_count":7436,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5473,"mirror_url":null,"open_issues_count":1198,"forks":5473,"open_issues":1198,"watchers":7436,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794"},"html":{"href":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/9794"},"issue":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/9794"},"comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/9794/comments"},"review_comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794/comments"},"review_comment":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/9794/commits"},"statuses":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/54b329f9da2618d55835a0f70680c7491cdc77a5"}}}}
{"actor":{"display_login":"frogcjn"}}