-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make signatures of simpleCellAddressToString
and simpleCellRangeToString
more logical
#1151
Comments
For a reason. Those are not the same. See #22 for a discussion on this topic. You can find examples in tests: expect(simpleCellAddressToString(sheetIndexMappingFunction, adr('A1'), 0)).toEqual('A1')
expect(simpleCellAddressToString(sheetIndexMappingFunction, adr('A1'), 1)).toEqual('Sheet1!A1') IMO making it optional is possible but will be harmful. It only solidifies misunderstanding of references. But if you decide to make it optional anyway, please keep in mind that it is a functionality, should not be interpreted as backward compatibility or removed in the future releases. |
@wojciechczerniak thank you for the clarification. I think I got it. The second argument of In that case:
Second, I'd rather change the signature of this function to something like this (but that would be a breaking change): public simpleCellAddressToString(cellAddress: SimpleCellAddress, options: { includeSheetName?: boolean } = {}): string | undefined { Third, the analogous changes should be applied to |
sheetId
optional in simpleCellAddressToString
methodsimpleCellAddressToString
and simpleCellRangeToString
Let's change the method signature but keep the old version still working. The second parameter should be |
simpleCellAddressToString
and simpleCellRangeToString
simpleCellAddressToString
and simpleCellRangeToString
more logical
Description
Currently
sheetId
needs to be passed twice tosimpleCellAddressToString
:The second argument toSee commentssimpleCellAddressToString
should be optional. Do not remove it completely to keep backwards compatibility.Links
The text was updated successfully, but these errors were encountered: