kibana/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunction.md
2020-10-30 06:01:45 +01:00

3.3 KiB

Home > kibana-plugin-plugins-expressions-public > ExpressionFunction

ExpressionFunction class

Signature:

export declare class ExpressionFunction implements PersistableState<ExpressionAstFunction['arguments']> 

Constructors

Constructor Modifiers Description
(constructor)(functionDefinition) Constructs a new instance of the ExpressionFunction class

Properties

Property Modifiers Type Description
accepts (type: string) => boolean
aliases string[] Aliases that can be used instead of name.
args Record<string, ExpressionFunctionParameter> Specification of expression function parameters.
disabled boolean
extract (state: ExpressionAstFunction['arguments']) => {
state: ExpressionAstFunction['arguments'];
references: SavedObjectReference[];
}
fn (input: ExpressionValue, params: Record<string, any>, handlers: object) => ExpressionValue Function to run function (context, args)
help string A short help text.
inject (state: ExpressionAstFunction['arguments'], references: SavedObjectReference[]) => ExpressionAstFunction['arguments']
inputTypes string[] | undefined Type of inputs that this function supports.
migrations {
[key: string]: (state: SerializableState) => SerializableState;
}
name string Name of function
telemetry (state: ExpressionAstFunction['arguments'], telemetryData: Record<string, any>) => Record<string, any>
type string Return type of function. This SHOULD be supplied. We use it for UI and autocomplete hinting. We may also use it for optimizations in the future.