MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / getSymbolNames

Function getSymbolNames

src/compute-engine/boxed-expression/validate.ts:641–654  ·  view source on GitHub ↗

Get the list of all known symbols in the current scope

(ce: ComputeEngine)

Source from the content-addressed store, hash-verified

639 * This narrows each operand of the handler's result that is a symbol with no
640 * value and an `unknown` type, at a slot whose declared parameter type is a
641 * collection type, to that parameter type. The type variables of the
642 * signature read as their bounds (`unknown` when unbounded), which is the
643 * type the non-lazy validation writes for the same slot: `collection<T>`
644 * gives `collection<unknown>`, `collection<any>` stays `collection<any>`.
645 * Only the operands the handler already canonicalized are read: a callback
646 * operand is at a function-typed slot and is never touched, so its own
647 * parameters are not bound or evaluated here. A slot that also admits a
648 * scalar (`value`, `number | collection<any>`) is not a collection slot and
649 * writes nothing. Fact-blind, since the written type outlives the
650 * assumptions in force.
651 *
652 * The inference applies ONLY to the operators of `COLLECTION_SOURCE_OPERATORS`
653 * (`isCollectionSourceOperator`), and the caller checks both the operator
654 * being boxed and the head of the handler's result. It must not run for every
655 * lazy operator: many lazy operators have a collection-typed slot that is not
656 * a source. `Subscript` is `(collection<any>, any) -> any`, and its handler
657 * keeps `a_{n+1}` as a `Subscript` with an untyped base precisely so that `a`

Callers 1

spellcheckSymbolsFunction · 0.85

Calls 3

isValueDefFunction · 0.90
keysMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected