Skip to content

TokensAPI

Defined in: namespaces-core-plugins.ts:346

Dotted-path token providers + template resolution (fn-92), e.g. {{project.name}}.

fn-92

registerProvider(prefix, provider, resolver): Promise<string>

Defined in: namespaces-core-plugins.ts:348

Registers a token provider for a dotted prefix. [tokens.provider.register]

string

AnyJSONValue

(path) => AnyJSONValue | Promise<AnyJSONValue>

Promise<string>


unregisterProvider(token): Promise<void>

Defined in: namespaces-core-plugins.ts:350

Unregisters a token provider by token.

string

Promise<void>


resolveString(template, opts?): Promise<string>

Defined in: namespaces-core-plugins.ts:352

Resolves {{a.b.c}} templates inside a string. [resources.read]

string

AnyJSONValue

Promise<string>


resolveJson(template, opts?): Promise<AnyJSONValue>

Defined in: namespaces-core-plugins.ts:354

Resolves a template preserving JSON types per the mixed-template contract. [resources.read]

string

AnyJSONValue

Promise<AnyJSONValue>