FunctionAnnotation interface

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

To resolve a FunctionAnnotation, an externally defined function is called.

Signature:

export interface FunctionAnnotation 

Remarks

The name identifies a function that takes in the arguments args, the current locale, as well as any options, and returns some corresponding output. Likely functions available by default would include 'plural' for determining the plural category of a numeric value, as well as 'number' and 'date' for formatting values.

Properties

Property Modifiers Type Description
[cst]?   CST.FunctionRef (BETA) (Optional)
name   string (BETA)
options?   Option[] (BETA) (Optional)
type   ‘function’ (BETA)