{"action":"created","issue":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/5599","repository_url":"https://api.github.com/repos/handsontable/handsontable","labels_url":"https://api.github.com/repos/handsontable/handsontable/issues/5599/labels{/name}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/5599/comments","events_url":"https://api.github.com/repos/handsontable/handsontable/issues/5599/events","html_url":"https://github.com/handsontable/handsontable/issues/5599","id":383166622,"node_id":"MDU6SXNzdWUzODMxNjY2MjI=","number":5599,"title":"Type definition for cells() function confusing","user":{"login":"aaronbeall","id":2973900,"node_id":"MDQ6VXNlcjI5NzM5MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2973900?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronbeall","html_url":"https://github.com/aaronbeall","followers_url":"https://api.github.com/users/aaronbeall/followers","following_url":"https://api.github.com/users/aaronbeall/following{/other_user}","gists_url":"https://api.github.com/users/aaronbeall/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbeall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbeall/subscriptions","organizations_url":"https://api.github.com/users/aaronbeall/orgs","repos_url":"https://api.github.com/users/aaronbeall/repos","events_url":"https://api.github.com/users/aaronbeall/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbeall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-21T15:20:13Z","updated_at":"2018-11-22T08:05:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description\r\n<!--- Tell us what happens and what should happen -->\r\nThe type definition for the `cells()` function currently looks like this:\r\n\r\n```\r\ncells?: (row?: number, col?: number, prop?: object) => GridSettings;\r\n```\r\n\r\n### Issues\r\n<!--- Provide steps to reproduce this issue -->\r\n1. Why are all the arguments marked as optional? This would indicate that sometimes they are `undefined`. This doesn't seem to be true, aren't they always populated?\r\n2. Why is `prop` typed as `object`? Shouldn't that be `string` or `string | number`?\r\n3. Is returning a `GridSettings` object always necessary? Or can `void` be returned?\r\n\r\n### Demo\r\n<!--- Provide a link to a live example on JSFiddle or Codepen or fill the following demo with your settings -->\r\nn/a\r\n\r\n### Your environment\r\n* Handsontable version:\r\n* Browser Name and version:\r\n* Operating System:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/comments/440945270","html_url":"https://github.com/handsontable/handsontable/issues/5599#issuecomment-440945270","issue_url":"https://api.github.com/repos/handsontable/handsontable/issues/5599","id":440945270,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDk0NTI3MA==","user":{"login":"AMBudnik","id":10757813,"node_id":"MDQ6VXNlcjEwNzU3ODEz","avatar_url":"https://avatars2.githubusercontent.com/u/10757813?v=4","gravatar_id":"","url":"https://api.github.com/users/AMBudnik","html_url":"https://github.com/AMBudnik","followers_url":"https://api.github.com/users/AMBudnik/followers","following_url":"https://api.github.com/users/AMBudnik/following{/other_user}","gists_url":"https://api.github.com/users/AMBudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/AMBudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMBudnik/subscriptions","organizations_url":"https://api.github.com/users/AMBudnik/orgs","repos_url":"https://api.github.com/users/AMBudnik/repos","events_url":"https://api.github.com/users/AMBudnik/events{/privacy}","received_events_url":"https://api.github.com/users/AMBudnik/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T08:05:43Z","updated_at":"2018-11-22T08:05:43Z","author_association":"CONTRIBUTOR","body":"Thank you for pointing that out @aaronbeall \r\n\r\nAccording to our docs\r\n\r\n> Possible values of prop:\r\n> * property name for column's data source object, when dataset is an array of objects\r\n> * the same number as col, when dataset is an array of arrays\r\n> Default Value: undefined\r\n\r\nso it should be a `string` or a `number`.\r\n\r\n\r\nTo be confirmed by @swistach or @wojciechczerniak \r\n1. According to docs\r\n> Parameters row and col always represent physical indexes.\r\n\r\nwe should not have a situation when the value is `undefined`.\r\n\r\n3. As far as I know we always return the settings, so `void` is not an option"}}
{"actor":{"display_login":"AMBudnik"}}