Skip to content

TokensAPI

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

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:379

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:381

Unregisters a token provider by token.

string

Promise<void>


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

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

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:385

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

string

AnyJSONValue

Promise<AnyJSONValue>