mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
17 lines
735 B
TypeScript
17 lines
735 B
TypeScript
// Type definitions for static-eval v0.2.4
|
|
// Project: https://github.com/substack/static-eval
|
|
// Definitions by: Ben Liddicott <https://github.com/benliddicott/DefinitelyTyped>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference path="../esprima/esprima.d.ts" />
|
|
|
|
declare module 'static-eval' {
|
|
/**
|
|
* Evaluates the given ESTree.Expression, with the given named variables in place.
|
|
* @param ast [ESTree.Expression] An esprima expression derived from parse.body[].expression
|
|
* @param vars Named variables, objects or functions which may be referenced in the expression.
|
|
*/
|
|
function evaluate(ast : ESTree.Expression, vars: { [name: string]: any }): any;
|
|
export =evaluate;
|
|
}
|