TemplaterApi
Templater’s internal API object, narrowed to the members this library calls.
Its members are snake_case because Templater’s are; they are transcribed rather than renamed so the shape can be checked against Templater’s source at a glance.
Import:
import type { TemplaterApi } from 'obsidian-dev-utils/obsidian/templater';Signature:
export interface TemplaterApiProperties
| Property | Type | Description |
|---|---|---|
| current_functions_object? | object | undefined | The functions object (tp) of the render currently in flight, when there is one. |
| functions_generator | TemplaterFunctionsGenerator | Builds the functions object (tp) a template is evaluated against. |
Methods
| Method | Returns | Description |
|---|---|---|
| create_running_config(templateFile, targetFile, runMode) | TemplaterRunningConfig | Builds the TemplaterRunningConfig that describes one render. |
| read_and_parse_template(config) | Promise<string> | Reads the config's template_file and renders it, returning the resulting text. |
Links to this page: