{"action":"created","comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/comments/216819640","pull_request_review_id":154393375,"id":216819640,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjgxOTY0MA==","diff_hunk":"@@ -0,0 +1,25 @@\n+import { of, timer } from 'rxjs';\n+import { throttle } from 'rxjs/operators';\n+\n+it('should infer correctly', () => {\n+  const o = of(1, 2, 3).pipe(throttle(() => timer(47))); // $ExpectType Observable<number>\n+});\n+\n+it('should infer correctly with a Promise', () => {\n+  const o = of(1, 2, 3).pipe(throttle(() => new Promise<boolean>(() => {}))); // $ExpectType Observable<number>\n+});\n+\n+it('should support a config', () => {\n+  const o = of(1, 2, 3).pipe(throttle(() => timer(47), { leading: true, trailing: true })); // $ExpectType Observable<number>\n+});\n+\n+it('should enforce types', () => {\n+  const o = of(1, 2, 3).pipe(throttle()); // $ExpectError\n+  const p = of(1, 2, 3).pipe(throttle(() => {})); // $ExpectError\n+});\n+\n+it('should enforce config types', () => {\n+  const o = of(1, 2, 3).pipe(throttle(() => timer(47), { x: 1 })); // $ExpectError\n+  const p = of(1, 2, 3).pipe(throttle(() => timer(47), { leading: 1, trailing: 1 })); // $ExpectError\n+  const q = of(1, 2, 3).pipe(throttle(() => timer(47), null)); // $ExpectError","path":"spec-dtslint/operators/throttle-spec.ts","position":24,"original_position":24,"commit_id":"0623d6502d03adc0b825b1364295c069b0f32897","original_commit_id":"0623d6502d03adc0b825b1364295c069b0f32897","user":{"login":"cartant","id":3878593,"node_id":"MDQ6VXNlcjM4Nzg1OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/3878593?v=4","gravatar_id":"","url":"https://api.github.com/users/cartant","html_url":"https://github.com/cartant","followers_url":"https://api.github.com/users/cartant/followers","following_url":"https://api.github.com/users/cartant/following{/other_user}","gists_url":"https://api.github.com/users/cartant/gists{/gist_id}","starred_url":"https://api.github.com/users/cartant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartant/subscriptions","organizations_url":"https://api.github.com/users/cartant/orgs","repos_url":"https://api.github.com/users/cartant/repos","events_url":"https://api.github.com/users/cartant/events{/privacy}","received_events_url":"https://api.github.com/users/cartant/received_events","type":"User","site_admin":false},"body":"Both [`throttle`](https://github.com/ReactiveX/rxjs/blob/6.3.2/src/internal/operators/throttle.ts#L66) and [`throttleTime`](https://github.com/ReactiveX/rxjs/blob/6.3.2/src/internal/operators/throttleTime.ts#L55) use a parameter default for the `config` object, so passing `null` should be an error. For the default to be used either the parameter would have to be omitted or `undefined` would have to be passed. That's my understanding, anyway, so I think the tests are okay.","created_at":"2018-09-11T20:56:45Z","updated_at":"2018-09-11T20:56:45Z","html_url":"https://github.com/ReactiveX/rxjs/pull/4120#discussion_r216819640","pull_request_url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/comments/216819640"},"html":{"href":"https://github.com/ReactiveX/rxjs/pull/4120#discussion_r216819640"},"pull_request":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120"}},"in_reply_to_id":216427027},"pull_request":{"url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120","id":214150271,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTUwMjcx","html_url":"https://github.com/ReactiveX/rxjs/pull/4120","diff_url":"https://github.com/ReactiveX/rxjs/pull/4120.diff","patch_url":"https://github.com/ReactiveX/rxjs/pull/4120.patch","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/4120","number":4120,"state":"open","locked":false,"title":"test(dtslint): add throttle","user":{"login":"timdeschryver","id":28659384,"node_id":"MDQ6VXNlcjI4NjU5Mzg0","avatar_url":"https://avatars1.githubusercontent.com/u/28659384?v=4","gravatar_id":"","url":"https://api.github.com/users/timdeschryver","html_url":"https://github.com/timdeschryver","followers_url":"https://api.github.com/users/timdeschryver/followers","following_url":"https://api.github.com/users/timdeschryver/following{/other_user}","gists_url":"https://api.github.com/users/timdeschryver/gists{/gist_id}","starred_url":"https://api.github.com/users/timdeschryver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdeschryver/subscriptions","organizations_url":"https://api.github.com/users/timdeschryver/orgs","repos_url":"https://api.github.com/users/timdeschryver/repos","events_url":"https://api.github.com/users/timdeschryver/events{/privacy}","received_events_url":"https://api.github.com/users/timdeschryver/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you very much for your pull request!\r\n\r\nIf your PR is the addition of a new operator, please make sure all these boxes are ticked with an x:\r\n\r\n- [ ] Add the operator to Rx\r\n- [ ] It must have a `-spec.ts` tests file covering the canonical corner cases, with marble diagram tests\r\n- [ ] If possible, write a `asDiagram` test case too, for PNG diagram generation purposes\r\n- [ ] The spec file should have a type definition test at the end of the spec to verify type definition for various use cases\r\n- [ ] The operator must be documented in JSDoc style in the implementation file, including also the PNG marble diagram image\r\n- [ ] The operator should be listed in `doc/operators.md` in a category of operators\r\n- [ ] The operator should also be documented. See [Documentation Guidelines](../CONTRIBUTING.md).\r\n- [ ] It should also be inserted in the operator decision tree file `doc/decision-tree-widget/tree.yml`\r\n- [ ] You may need to update `MIGRATION.md` if the operator differs from the corresponding one in RxJS v4\r\n-->\r\n\r\n**Description:**\r\nThis PR adds dtslint tests for `throttle`.\r\n\r\n**Related issue (if exists):** #4093 \r\n","created_at":"2018-09-09T15:25:14Z","updated_at":"2018-09-11T20:56:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f406f3f5b22b1596510ab9f8ee732aaf84b57c2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120/commits","review_comments_url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120/comments","review_comment_url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/4120/comments","statuses_url":"https://api.github.com/repos/ReactiveX/rxjs/statuses/0623d6502d03adc0b825b1364295c069b0f32897","head":{"label":"timdeschryver:pr/dtslint-throttle","ref":"pr/dtslint-throttle","sha":"0623d6502d03adc0b825b1364295c069b0f32897","user":{"login":"timdeschryver","id":28659384,"node_id":"MDQ6VXNlcjI4NjU5Mzg0","avatar_url":"https://avatars1.githubusercontent.com/u/28659384?v=4","gravatar_id":"","url":"https://api.github.com/users/timdeschryver","html_url":"https://github.com/timdeschryver","followers_url":"https://api.github.com/users/timdeschryver/followers","following_url":"https://api.github.com/users/timdeschryver/following{/other_user}","gists_url":"https://api.github.com/users/timdeschryver/gists{/gist_id}","starred_url":"https://api.github.com/users/timdeschryver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdeschryver/subscriptions","organizations_url":"https://api.github.com/users/timdeschryver/orgs","repos_url":"https://api.github.com/users/timdeschryver/repos","events_url":"https://api.github.com/users/timdeschryver/events{/privacy}","received_events_url":"https://api.github.com/users/timdeschryver/received_events","type":"User","site_admin":false},"repo":{"id":145208468,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUyMDg0Njg=","name":"rxjs","full_name":"timdeschryver/rxjs","owner":{"login":"timdeschryver","id":28659384,"node_id":"MDQ6VXNlcjI4NjU5Mzg0","avatar_url":"https://avatars1.githubusercontent.com/u/28659384?v=4","gravatar_id":"","url":"https://api.github.com/users/timdeschryver","html_url":"https://github.com/timdeschryver","followers_url":"https://api.github.com/users/timdeschryver/followers","following_url":"https://api.github.com/users/timdeschryver/following{/other_user}","gists_url":"https://api.github.com/users/timdeschryver/gists{/gist_id}","starred_url":"https://api.github.com/users/timdeschryver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdeschryver/subscriptions","organizations_url":"https://api.github.com/users/timdeschryver/orgs","repos_url":"https://api.github.com/users/timdeschryver/repos","events_url":"https://api.github.com/users/timdeschryver/events{/privacy}","received_events_url":"https://api.github.com/users/timdeschryver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timdeschryver/rxjs","description":"A reactive programming library for JavaScript","fork":true,"url":"https://api.github.com/repos/timdeschryver/rxjs","forks_url":"https://api.github.com/repos/timdeschryver/rxjs/forks","keys_url":"https://api.github.com/repos/timdeschryver/rxjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timdeschryver/rxjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timdeschryver/rxjs/teams","hooks_url":"https://api.github.com/repos/timdeschryver/rxjs/hooks","issue_events_url":"https://api.github.com/repos/timdeschryver/rxjs/issues/events{/number}","events_url":"https://api.github.com/repos/timdeschryver/rxjs/events","assignees_url":"https://api.github.com/repos/timdeschryver/rxjs/assignees{/user}","branches_url":"https://api.github.com/repos/timdeschryver/rxjs/branches{/branch}","tags_url":"https://api.github.com/repos/timdeschryver/rxjs/tags","blobs_url":"https://api.github.com/repos/timdeschryver/rxjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timdeschryver/rxjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timdeschryver/rxjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/timdeschryver/rxjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timdeschryver/rxjs/statuses/{sha}","languages_url":"https://api.github.com/repos/timdeschryver/rxjs/languages","stargazers_url":"https://api.github.com/repos/timdeschryver/rxjs/stargazers","contributors_url":"https://api.github.com/repos/timdeschryver/rxjs/contributors","subscribers_url":"https://api.github.com/repos/timdeschryver/rxjs/subscribers","subscription_url":"https://api.github.com/repos/timdeschryver/rxjs/subscription","commits_url":"https://api.github.com/repos/timdeschryver/rxjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/timdeschryver/rxjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/timdeschryver/rxjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/timdeschryver/rxjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/timdeschryver/rxjs/contents/{+path}","compare_url":"https://api.github.com/repos/timdeschryver/rxjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timdeschryver/rxjs/merges","archive_url":"https://api.github.com/repos/timdeschryver/rxjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timdeschryver/rxjs/downloads","issues_url":"https://api.github.com/repos/timdeschryver/rxjs/issues{/number}","pulls_url":"https://api.github.com/repos/timdeschryver/rxjs/pulls{/number}","milestones_url":"https://api.github.com/repos/timdeschryver/rxjs/milestones{/number}","notifications_url":"https://api.github.com/repos/timdeschryver/rxjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timdeschryver/rxjs/labels{/name}","releases_url":"https://api.github.com/repos/timdeschryver/rxjs/releases{/id}","deployments_url":"https://api.github.com/repos/timdeschryver/rxjs/deployments","created_at":"2018-08-18T09:49:27Z","updated_at":"2018-09-09T07:03:48Z","pushed_at":"2018-09-10T18:24:46Z","git_url":"git://github.com/timdeschryver/rxjs.git","ssh_url":"git@github.com:timdeschryver/rxjs.git","clone_url":"https://github.com/timdeschryver/rxjs.git","svn_url":"https://github.com/timdeschryver/rxjs","homepage":"http://reactivex.io/rxjs","size":101419,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ReactiveX:master","ref":"master","sha":"c1c66d2d0ab552bffc019fb6d35971707010d234","user":{"login":"ReactiveX","id":6407041,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MDcwNDE=","avatar_url":"https://avatars1.githubusercontent.com/u/6407041?v=4","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"repo":{"id":32247847,"node_id":"MDEwOlJlcG9zaXRvcnkzMjI0Nzg0Nw==","name":"rxjs","full_name":"ReactiveX/rxjs","owner":{"login":"ReactiveX","id":6407041,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MDcwNDE=","avatar_url":"https://avatars1.githubusercontent.com/u/6407041?v=4","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReactiveX/rxjs","description":"A reactive programming library for JavaScript","fork":false,"url":"https://api.github.com/repos/ReactiveX/rxjs","forks_url":"https://api.github.com/repos/ReactiveX/rxjs/forks","keys_url":"https://api.github.com/repos/ReactiveX/rxjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReactiveX/rxjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReactiveX/rxjs/teams","hooks_url":"https://api.github.com/repos/ReactiveX/rxjs/hooks","issue_events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/events{/number}","events_url":"https://api.github.com/repos/ReactiveX/rxjs/events","assignees_url":"https://api.github.com/repos/ReactiveX/rxjs/assignees{/user}","branches_url":"https://api.github.com/repos/ReactiveX/rxjs/branches{/branch}","tags_url":"https://api.github.com/repos/ReactiveX/rxjs/tags","blobs_url":"https://api.github.com/repos/ReactiveX/rxjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReactiveX/rxjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReactiveX/rxjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReactiveX/rxjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReactiveX/rxjs/statuses/{sha}","languages_url":"https://api.github.com/repos/ReactiveX/rxjs/languages","stargazers_url":"https://api.github.com/repos/ReactiveX/rxjs/stargazers","contributors_url":"https://api.github.com/repos/ReactiveX/rxjs/contributors","subscribers_url":"https://api.github.com/repos/ReactiveX/rxjs/subscribers","subscription_url":"https://api.github.com/repos/ReactiveX/rxjs/subscription","commits_url":"https://api.github.com/repos/ReactiveX/rxjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReactiveX/rxjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReactiveX/rxjs/contents/{+path}","compare_url":"https://api.github.com/repos/ReactiveX/rxjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReactiveX/rxjs/merges","archive_url":"https://api.github.com/repos/ReactiveX/rxjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReactiveX/rxjs/downloads","issues_url":"https://api.github.com/repos/ReactiveX/rxjs/issues{/number}","pulls_url":"https://api.github.com/repos/ReactiveX/rxjs/pulls{/number}","milestones_url":"https://api.github.com/repos/ReactiveX/rxjs/milestones{/number}","notifications_url":"https://api.github.com/repos/ReactiveX/rxjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/labels{/name}","releases_url":"https://api.github.com/repos/ReactiveX/rxjs/releases{/id}","deployments_url":"https://api.github.com/repos/ReactiveX/rxjs/deployments","created_at":"2015-03-15T06:17:10Z","updated_at":"2018-09-11T20:54:25Z","pushed_at":"2018-09-11T20:50:53Z","git_url":"git://github.com/ReactiveX/rxjs.git","ssh_url":"git@github.com:ReactiveX/rxjs.git","clone_url":"https://github.com/ReactiveX/rxjs.git","svn_url":"https://github.com/ReactiveX/rxjs","homepage":"http://reactivex.io/rxjs","size":101527,"stargazers_count":14722,"watchers_count":14722,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1468,"mirror_url":null,"archived":false,"open_issues_count":248,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1468,"open_issues":248,"watchers":14722,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120"},"html":{"href":"https://github.com/ReactiveX/rxjs/pull/4120"},"issue":{"href":"https://api.github.com/repos/ReactiveX/rxjs/issues/4120"},"comments":{"href":"https://api.github.com/repos/ReactiveX/rxjs/issues/4120/comments"},"review_comments":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120/comments"},"review_comment":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReactiveX/rxjs/pulls/4120/commits"},"statuses":{"href":"https://api.github.com/repos/ReactiveX/rxjs/statuses/0623d6502d03adc0b825b1364295c069b0f32897"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cartant"}}