MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / resolved

Function resolved

packages/language/src/utils.ts:193–198  ·  view source on GitHub ↗
(ref: Reference<T>)

Source from the content-addressed store, hash-verified

191 * Resolves the given reference and returns the target AST node. Throws an error if the reference is not resolved.
192 */
193export function resolved<T extends AstNode>(ref: Reference<T>): T {
194 if (!ref.ref) {
195 throw new Error(`Reference not resolved: ${ref.$refText}`);
196 }
197 return ref.ref;
198}
199
200/**
201 * Gets all base models and mixins of a data model or type def, recursively.

Callers 4

getModelIdFieldsFunction · 0.70
getModelUniqueFieldsFunction · 0.70
getUniqueFieldsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected