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 '@mnaoumov/obsidian-lib/templater';Signature:
export interface TemplaterApiProperties
| Property | Type | Description |
|---|---|---|
| create_running_config | (templateFile: TFile | undefined, targetFile: TFile, runMode: TemplaterRunMode) => TemplaterRunningConfig | Builds the TemplaterRunningConfig that describes one render. |
| 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. |
| read_and_parse_template | (config: TemplaterRunningConfig) => Promise<string> | Reads the config's template_file and renders it, returning the resulting text. |
Links to this page: