-
Notifications
You must be signed in to change notification settings - Fork 100
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
[patch] Re-submit #867: Custom function - new field "cellValueType" for input cell value type information #895
[patch] Re-submit #867: Custom function - new field "cellValueType" for input cell value type information #895
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK. Suggest seeing if @ts-ignore
can be removed, but that doesn't block check-in.
@@ -708,6 +722,13 @@ function getParameters(parameterItem: IGetParametersArguments): IFunctionParamet | |||
type: ptype, | |||
}; | |||
|
|||
// for backward compatibility, we put cell value type in cellValueType instead of type. | |||
if (Object.values(CELLVALUETYPE_MAPPINGS).includes(ptype)) { | |||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to not have @ts-ignore
here. Usually the code could be modified. Can you please look into this?
/azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
This is a duplicate of PR#867 as the original branch is not able to get update.
Change Description:
Cell value types have been introduced to custom function input parameter type. We decided to move it to a new attribute "cellValueType" for backward compatibility, so that older client won't break on unknown types.
"cellValueType" works as follows:
When "type" is one of "boolean"/"number"/"string", "cellValueType" won't be parsed by Excel. When "type" is "any" and "cellValueType" is a valid cell value type, the cell value type will be used as custom function parameter type. If "cellValueType" is invalid, Excel will use the fallback "type" "any".
Sample function metadata before change:
after change:
Do these changes impact command syntax of any of the packages? (e.g., add/remove command, add/remove a command parameter, or update required parameters)
No
Do these changes impact documentation? (e.g., a tutorial on https://learn.microsoft.com/office/dev/add-ins/overview/office-add-ins)
Cell value types are not public yet.
Validation/testing performed:
Updated and ran tests.