OfficeDev / office-js-docs

[ARCHIVED] Microsoft Office Add-ins API Reference Documentation
https://docs.microsoft.com/javascript/api/overview/office
398 stars 233 forks source link

Range.find SearchCriteria parameter should be optional #1519

Closed AlexJerabek closed 5 years ago

AlexJerabek commented 5 years ago

Product

Excel

Feedback

Range.find currently has this signature: find(text: string, criteria: Excel.SearchCriteria): Excel.Range;. My proposal would be to change it to find(text: string, criteria?: Excel.SearchCriteria): Excel.Range;. Since every property of SearchCriteria has a default value, it doesn't make sense to force users to put an empty struct ({}) to get default search behavior.

kbrandl commented 5 years ago

Closing this issue, as it's already been addressed.