MCPcopy Create free account
hub / github.com/garrytan/gstack / unwrapResolver

Function unwrapResolver

scripts/resolvers/types.ts:111–117  ·  view source on GitHub ↗
(entry: ResolverValue)

Source from the content-addressed store, hash-verified

109 * Returns (resolverFn, gate) so callers can do gate?.(ctx) before invoking.
110 */
111export function unwrapResolver(entry: ResolverValue): {
112 resolve: ResolverFn;
113 appliesTo?: (ctx: TemplateContext) => boolean;
114} {
115 if (typeof entry === 'function') return { resolve: entry };
116 return { resolve: entry.resolve, appliesTo: entry.appliesTo };
117}

Callers 3

simulateGenSubstitutionFunction · 0.90
onePassFunction · 0.90

Calls

no outgoing calls

Tested by 1

simulateGenSubstitutionFunction · 0.72