@types/jexl
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for jexl 2.2 | ||
// Type definitions for jexl 2.3 | ||
// Project: https://github.com/TomFrost/Jexl | ||
@@ -15,2 +15,4 @@ // Definitions by: Marcin Tomczyk <https://github.com/m-tomczyk> | ||
type FunctionFunction = (value: any, ...args: any[]) => any; | ||
/** | ||
@@ -77,2 +79,27 @@ * Jexl is the Javascript Expression Language, capable of parsing and | ||
/** | ||
* Adds or replaces an expression function in this Jexl instance. | ||
* @param name The name of the expression function, as it will be | ||
* used within Jexl expressions. | ||
* @param fn The javascript function to be executed when this | ||
* expression function is invoked. It will be provided with each argument | ||
* supplied in the expression, in the same order. | ||
*/ | ||
addFunction(name: string, fn: FunctionFunction): void; | ||
/** | ||
* Syntatic sugar for calling {@link #addFunction} repeatedly. This function | ||
* accepts a map of one or more expression function names to their javascript | ||
* function counterpart. | ||
* @param map A map of expression function names to javascript functions. | ||
*/ | ||
addFunctions(map: { [key: string]: FunctionFunction }): void; | ||
/** | ||
* Retrieves a previously set expression function. | ||
* @param name The name of the expression function | ||
* @returns The expression function | ||
*/ | ||
getFunction(name: string): FunctionFunction; | ||
/** | ||
* Asynchronously evaluates a Jexl string within an optional context. | ||
@@ -79,0 +106,0 @@ * @param expression The Jexl expression to be evaluated |
{ | ||
"name": "@types/jexl", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "TypeScript definitions for jexl", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jexl", | ||
"license": "MIT", | ||
@@ -22,4 +23,4 @@ "contributors": [ | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "d5f7766c2eaa94769d4e88a81cace998315131e02b48258329ec2bf76e4ce64e", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "8967824a810a8099b473353bc98dbfa8992d81b2a64077d3fdd02dd46488baa1", | ||
"typeScriptVersion": "3.7" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 18 Dec 2019 15:21:49 GMT | ||
* Last updated: Wed, 15 Sep 2021 21:01:46 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Marcin Tomczyk (https://github.com/m-tomczyk). | ||
These definitions were written by [Marcin Tomczyk](https://github.com/m-tomczyk). |
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
10006
166
0