{"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/comments/11007863","html_url":"https://github.com/Microsoft/TypeScript/commit/dda598a8dc8d5459df3cee26c43ecf501ffc6844#commitcomment-11007863","id":11007863,"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},"position":70,"line":3923,"path":"src/services/services.ts","commit_id":"dda598a8dc8d5459df3cee26c43ecf501ffc6844","created_at":"2015-05-01T21:07:39Z","updated_at":"2015-05-01T21:07:39Z","body":"Factor our into a local variable - `isAppropriateSignature`:\r\n\r\n```TypeScript\r\nlet isAppropriateSignature = selectConstructors ?\r\n    d.kind === SyntaxKind.Constructor :\r\n    (d.kind === SyntaxKind.FunctionDeclaration || d.kind === SyntaxKind.MethodDeclaration || d.kind === SyntaxKind.MethodSignature);\r\n```\r\n\r\nAlso maybe factor out\r\n\r\n```TypeScript\r\n(d.kind === SyntaxKind.FunctionDeclaration || d.kind === SyntaxKind.MethodDeclaration || d.kind === SyntaxKind.MethodSignature)\r\n```\r\n\r\ninto a clean helper."}}