This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,53 @@ import { Literal } from "obsidian-dataview"
22import { DateTime , DurationLikeObject } from "luxon" ;
33
44type NumbersFnType = {
5+ /**
6+ * Summatory of the list of values
7+ * @param values
8+ * @returns
9+ */
510 sum : ( values : Literal [ ] ) => number ;
11+ /**
12+ * Obtains the minimum value of the list of values
13+ * @param values
14+ * @returns
15+ */
616 min : ( values : Literal [ ] ) => number ;
17+ /**
18+ * Obtains the maximum value of the list of values
19+ * @param values
20+ * @returns
21+ */
722 max : ( values : Literal [ ] ) => number ;
823 [ key : string ] : unknown
924}
1025
1126type LuxonFnType = {
27+ /**
28+ * Returns the earliest date in the list of values
29+ * @param values
30+ * @returns
31+ */
1232 earliest : ( values : Literal [ ] ) => DateTime ;
33+ /**
34+ * Returns the latest date in the list of values
35+ * @param values
36+ * @returns
37+ */
1338 latest : ( values : Literal [ ] ) => DateTime ;
39+ /**
40+ * Returns the duration between the earliest and latest dates in the list of values
41+ * @param values
42+ * @param dl - Duration like object key. "days" by default. See https://www.jsdocs.io/package/@types/luxon#DurationLikeObject
43+ * @returns
44+ */
1445 range : ( values : Literal [ ] , dl ?: keyof DurationLikeObject ) => number ;
1546 [ key : string ] : unknown
1647}
1748
49+ /**
50+ * Exposed functionalities under the `db` variable of Formulas
51+ */
1852export type DatabaseFnType = {
1953 numbers : NumbersFnType ;
2054 luxon : LuxonFnType ;
You can’t perform that action at this time.
0 commit comments