staskstate meta data
This commit is contained in:
@@ -25,6 +25,13 @@ export const builtins: Record<string, Record<string, string>> = {
|
||||
pos: "number",
|
||||
tags: "array",
|
||||
},
|
||||
taskstate: {
|
||||
ref: "string",
|
||||
tags: "array",
|
||||
state: "string",
|
||||
count: "number",
|
||||
page: "string",
|
||||
},
|
||||
tag: {
|
||||
ref: "string",
|
||||
name: "string",
|
||||
|
||||
+12
-14
@@ -20,24 +20,22 @@ import { rewritePageRefs } from "$sb/lib/resolve.ts";
|
||||
import { ObjectValue } from "$sb/types.ts";
|
||||
import { indexObjects, queryObjects } from "../index/plug_api.ts";
|
||||
|
||||
export type TaskObject = {
|
||||
ref: string;
|
||||
tags: string[];
|
||||
page: string;
|
||||
pos: number;
|
||||
name: string;
|
||||
done: boolean;
|
||||
state: string;
|
||||
deadline?: string;
|
||||
} & Record<string, any>;
|
||||
export type TaskObject = ObjectValue<
|
||||
{
|
||||
page: string;
|
||||
pos: number;
|
||||
name: string;
|
||||
done: boolean;
|
||||
state: string;
|
||||
deadline?: string;
|
||||
} & Record<string, any>
|
||||
>;
|
||||
|
||||
export type TaskStateObject = {
|
||||
ref: string;
|
||||
tags: string[];
|
||||
export type TaskStateObject = ObjectValue<{
|
||||
state: string;
|
||||
count: number;
|
||||
page: string;
|
||||
};
|
||||
}>;
|
||||
|
||||
function getDeadline(deadlineNode: ParseTree): string {
|
||||
return deadlineNode.children![0].text!.replace(/📅\s*/, "");
|
||||
|
||||
Reference in New Issue
Block a user