mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
server-ts: Port services/search/expressions/child_of
This commit is contained in:
parent
0df488667e
commit
ccc51e0123
@ -1,16 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
import Expression = require('./expression');
|
||||
import NoteSet = require('../note_set');
|
||||
import SearchContext = require('../search_context');
|
||||
|
||||
class ChildOfExp extends Expression {
|
||||
constructor(subExpression) {
|
||||
|
||||
private subExpression: Expression;
|
||||
|
||||
constructor(subExpression: Expression) {
|
||||
super();
|
||||
|
||||
this.subExpression = subExpression;
|
||||
}
|
||||
|
||||
execute(inputNoteSet, executionContext, searchContext) {
|
||||
execute(inputNoteSet: NoteSet, executionContext: {}, searchContext: SearchContext) {
|
||||
const subInputNoteSet = new NoteSet();
|
||||
|
||||
for (const note of inputNoteSet.notes) {
|
||||
@ -33,4 +37,4 @@ class ChildOfExp extends Expression {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ChildOfExp;
|
||||
export = ChildOfExp;
|
@ -4,7 +4,7 @@ const dayjs = require("dayjs");
|
||||
const AndExp = require('../expressions/and');
|
||||
const OrExp = require('../expressions/or.js');
|
||||
const NotExp = require('../expressions/not.js');
|
||||
const ChildOfExp = require('../expressions/child_of.js');
|
||||
const ChildOfExp = require('../expressions/child_of');
|
||||
const DescendantOfExp = require('../expressions/descendant_of.js');
|
||||
const ParentOfExp = require('../expressions/parent_of.js');
|
||||
const RelationWhereExp = require('../expressions/relation_where.js');
|
||||
|
Loading…
x
Reference in New Issue
Block a user