Skip to content

Commit de9cbd7

Browse files
committed
jsdoc: Document current behaviour of TasksFile
1 parent fe1330f commit de9cbd7

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/Scripting/TasksFile.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ export class TasksFile {
5757
* See [FrontMatterCache](https://docs.obsidian.md/Reference/TypeScript+API/FrontMatterCache).
5858
* But prefer using {@link frontmatter} where possible.
5959
*
60-
* @note This is currently only populated for Task objects when read in the Obsidian plugin.
61-
* It's not populated for queries in the plugin, nor in most unit tests.
60+
* @note This is currently only populated for Task objects when read in the Obsidian plugin,
61+
* and queries in the plugin.
62+
* It's not populated in most unit tests.
6263
* If not available, it returns an empty object, {}.
6364
*
6465
* @see frontmatter, which provides a cleaned-up version of the raw frontmatter.
@@ -167,6 +168,11 @@ export class TasksFile {
167168
return this.withoutExtension(this.filename);
168169
}
169170

171+
/**
172+
* This is documented for users and so must not be changed.
173+
* https://publish.obsidian.md/tasks/Getting+Started/Obsidian+Properties#How+does+Tasks+treat+Obsidian+Properties%3F
174+
* @param key
175+
*/
170176
public hasProperty(key: string): boolean {
171177
const foundKey = this.findKeyInFrontmatter(key);
172178
if (foundKey === undefined) {
@@ -185,6 +191,11 @@ export class TasksFile {
185191
return true;
186192
}
187193

194+
/**
195+
* This is documented for users and so must not be changed.
196+
* https://publish.obsidian.md/tasks/Getting+Started/Obsidian+Properties#How+does+Tasks+treat+Obsidian+Properties%3F
197+
* @param key
198+
*/
188199
public property(key: string): any {
189200
const foundKey = this.findKeyInFrontmatter(key);
190201
if (foundKey === undefined) {

0 commit comments

Comments
 (0)