Features available to the TypeScript code at evaluation time
code
string
The TypeScript source code of the rule. Must define a `rule()` function that accepts the declared features as positional arguments (in the same order as the `features` array) and returns an array of a
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/typescript-code-parameters",
"title": "TypeScript Code Parameters",
"description": "Parameters for defining a TypeScript code rule",
"type": "object",
"properties": {
"features": {
"type": "array",
"description": "Features available to the TypeScript code at evaluation time",
"items": {
"$ref": "#/components/schemas/rule-feature"
}
},
"code": {
"type": "string",
"description": "The TypeScript source code of the rule. Must define a `rule()` function that accepts the declared features as positional arguments (in the same order as the `features` array) and returns an array of actions."
}
},
"required": [
"features",
"code"
]
}