{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5966","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5966/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5966/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5966/events","html_url":"https://github.com/Microsoft/TypeScript/issues/5966","id":120718284,"number":5966,"title":"How can i define an interface for method only available to specific other methos","user":{"login":"sebglon","id":3148666,"avatar_url":"https://avatars.githubusercontent.com/u/3148666?v=3","gravatar_id":"","url":"https://api.github.com/users/sebglon","html_url":"https://github.com/sebglon","followers_url":"https://api.github.com/users/sebglon/followers","following_url":"https://api.github.com/users/sebglon/following{/other_user}","gists_url":"https://api.github.com/users/sebglon/gists{/gist_id}","starred_url":"https://api.github.com/users/sebglon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebglon/subscriptions","organizations_url":"https://api.github.com/users/sebglon/orgs","repos_url":"https://api.github.com/users/sebglon/repos","events_url":"https://api.github.com/users/sebglon/events{/privacy}","received_events_url":"https://api.github.com/users/sebglon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-07T07:51:21Z","updated_at":"2015-12-07T08:45:02Z","closed_at":null,"body":"On pouchdb.d.ts projet i'm stuck on writing for the emit method that is accessible only for reduce method.\r\n\r\nExemple\r\n\r\n```\r\nfunction reduce(doc) {\r\n   emit(xx, yy)\r\n}\r\n```\r\n\r\nthe emit method can only by called by reduce function.\r\n\r\nHow can i write this on Definitely type?\r\nThanks for your help.\r\n\r\nAGBrown/pouchdb.d.ts#36"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/162449599","html_url":"https://github.com/Microsoft/TypeScript/issues/5966#issuecomment-162449599","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5966","id":162449599,"user":{"login":"sebglon","id":3148666,"avatar_url":"https://avatars.githubusercontent.com/u/3148666?v=3","gravatar_id":"","url":"https://api.github.com/users/sebglon","html_url":"https://github.com/sebglon","followers_url":"https://api.github.com/users/sebglon/followers","following_url":"https://api.github.com/users/sebglon/following{/other_user}","gists_url":"https://api.github.com/users/sebglon/gists{/gist_id}","starred_url":"https://api.github.com/users/sebglon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebglon/subscriptions","organizations_url":"https://api.github.com/users/sebglon/orgs","repos_url":"https://api.github.com/users/sebglon/repos","events_url":"https://api.github.com/users/sebglon/events{/privacy}","received_events_url":"https://api.github.com/users/sebglon/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T08:45:02Z","updated_at":"2015-12-07T08:45:02Z","body":"````javascript\r\nfunction mapReduce(doc) {\r\n    var emit = (x,y) => {\r\n         // ...\r\n    }\r\n var mapFun = z.callback\r\n}\r\n\r\nvar mapFun = (doc) => {\r\n      emit(doc.x,doc.y);  // emit can only be called from callback function\r\n}\r\n````"}}