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 'obsidian-dev-utils/obsidian/templater';

Signature:

export interface TemplaterApi

Properties

PropertyTypeDescription
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.

Methods

MethodReturnsDescription
create_running_config(templateFile, targetFile, runMode)TemplaterRunningConfigBuilds 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: