Skip to content

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 TemplaterApi

Properties

PropertyTypeDescription
create_running_config(templateFile: TFile | undefined, targetFile: TFile, runMode: TemplaterRunMode) => TemplaterRunningConfigBuilds the TemplaterRunningConfig that describes one render.
current_functions_object?object | undefinedThe functions object (tp) of the render currently in flight, when there is one.
functions_generatorTemplaterFunctionsGeneratorBuilds 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: