MCPcopy
hub / github.com/sveltejs/svelte / evaluate

Method evaluate

packages/svelte/src/compiler/phases/scope.js:803–808  ·  view source on GitHub ↗

* Does partial evaluation to find an exact value or at least the rough type of the expression. * Only call this once scope has been fully generated in a first pass, * else this evaluates on incomplete data and may yield wrong results. * @param {Expression} expression * @param {Set<any>} [val

(expression, values = new Set())

Source from the content-addressed store, hash-verified

801 * @param {Set<any>} [values]
802 */
803 evaluate(expression, values = new Set()) {
804 const current = current_evaluations.get(expression);
805 if (current) return current;
806
807 return new Evaluation(this, expression, values);
808 }
809}
810
811/**

Callers 12

constructorMethod · 0.80
TitleElementFunction · 0.80
build_assignmentFunction · 0.80
CallExpressionFunction · 0.80
build_componentFunction · 0.80
build_template_chunkFunction · 0.80
SvelteBoundaryFunction · 0.80
flushFunction · 0.80
build_attribute_valueFunction · 0.80
IdentifierFunction · 0.80
run_testFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected