mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
1.5 KiB
1.5 KiB
Home > kibana-plugin-plugins-expressions-public > buildExpressionFunction
buildExpressionFunction() function
Manages an AST for a single expression function. The return value can be provided to buildExpression
to add this function to an expression.
Note that to preserve type safety and ensure no args are missing, all required arguments for the specified function must be provided up front. If desired, they can be changed or removed later.
Signature:
export declare function buildExpressionFunction<FnDef extends AnyExpressionFunctionDefinition = AnyExpressionFunctionDefinition>(fnName: InferFunctionDefinition<FnDef>['name'],
initialArgs: {
[K in keyof FunctionArgs<FnDef>]: FunctionArgs<FnDef>[K] | ExpressionAstExpressionBuilder | ExpressionAstExpressionBuilder[];
}): ExpressionAstFunctionBuilder<FnDef>;
Parameters
Parameter | Type | Description |
---|---|---|
fnName | InferFunctionDefinition<FnDef>['name'] |
|
initialArgs | { [K in keyof FunctionArgs<FnDef>]: FunctionArgs<FnDef>[K] | ExpressionAstExpressionBuilder | ExpressionAstExpressionBuilder[]; } |
Returns:
ExpressionAstFunctionBuilder<FnDef>