{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/5","repository_url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/5/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/5/events","html_url":"https://github.com/rethinkdb/rethinkdb-ts/pull/5","id":368385488,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTc2NDgy","number":5,"title":"enhancement: Make TypeScript complain when awaiting RQuery","user":{"login":"kyranet","id":24852502,"node_id":"MDQ6VXNlcjI0ODUyNTAy","avatar_url":"https://avatars0.githubusercontent.com/u/24852502?v=4","gravatar_id":"","url":"https://api.github.com/users/kyranet","html_url":"https://github.com/kyranet","followers_url":"https://api.github.com/users/kyranet/followers","following_url":"https://api.github.com/users/kyranet/following{/other_user}","gists_url":"https://api.github.com/users/kyranet/gists{/gist_id}","starred_url":"https://api.github.com/users/kyranet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyranet/subscriptions","organizations_url":"https://api.github.com/users/kyranet/orgs","repos_url":"https://api.github.com/users/kyranet/repos","events_url":"https://api.github.com/users/kyranet/events{/privacy}","received_events_url":"https://api.github.com/users/kyranet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T20:34:47Z","updated_at":"2018-10-10T10:12:29Z","closed_at":"2018-10-10T10:11:32Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/pulls/5","html_url":"https://github.com/rethinkdb/rethinkdb-ts/pull/5","diff_url":"https://github.com/rethinkdb/rethinkdb-ts/pull/5.diff","patch_url":"https://github.com/rethinkdb/rethinkdb-ts/pull/5.patch"},"body":"RQuery.then() (or await RQuery) always throw a `ReqlUnknownError` with the following message: ``Cannot `​await`​ a query, did you forget `​run`​ or `​getCursor`​?``, which is something users migrating from rethinkdbdash would often see, specially when having a large project, and TypeScript does not warn about this.\r\n\r\nTherefore, RQuery.then() always throws. It is correct it has a `then` method with return type `never`, but this was not implemented in the actual types.\r\n\r\nAdding this line will cause TypeScript to emit an error in our IDE saying *[ts] Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.* which will help users perform a safer and faster migration."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/comments/428516701","html_url":"https://github.com/rethinkdb/rethinkdb-ts/pull/5#issuecomment-428516701","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb-ts/issues/5","id":428516701,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODUxNjcwMQ==","user":{"login":"ronzeidman","id":14001863,"node_id":"MDQ6VXNlcjE0MDAxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/14001863?v=4","gravatar_id":"","url":"https://api.github.com/users/ronzeidman","html_url":"https://github.com/ronzeidman","followers_url":"https://api.github.com/users/ronzeidman/followers","following_url":"https://api.github.com/users/ronzeidman/following{/other_user}","gists_url":"https://api.github.com/users/ronzeidman/gists{/gist_id}","starred_url":"https://api.github.com/users/ronzeidman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronzeidman/subscriptions","organizations_url":"https://api.github.com/users/ronzeidman/orgs","repos_url":"https://api.github.com/users/ronzeidman/repos","events_url":"https://api.github.com/users/ronzeidman/events{/privacy}","received_events_url":"https://api.github.com/users/ronzeidman/received_events","type":"User","site_admin":false},"created_at":"2018-10-10T10:12:29Z","updated_at":"2018-10-10T10:12:29Z","author_association":"NONE","body":"Nice!"}}
{"actor":{"display_login":"ronzeidman"}}