trilium
    Preparing search index...

    Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple parents.

    Note that you should not rely on the branch's identity, since it can change easily with a note's move. Always check noteId instead.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    blobId?: string
    branchId?: string
    dateCreated?: string
    dateModified?: string
    isExpanded: boolean
    isProtected?: boolean
    isSynced?: boolean
    noteId: string
    notePosition: number
    parentNoteId: string
    prefix: null | string
    utcDateCreated: string
    utcDateModified?: string

    Accessors

    • get isWeak(): boolean

      Branch is weak when its existence should not hinder deletion of its note. As a result, note with only weak branches should be immediately deleted. An example is shared or bookmarked clones - they are created automatically and exist for technical reasons, not as user-intended actions. From user perspective, they don't count as real clones and for the purpose of deletion should not act as a clone.

      Returns boolean

    Methods

    • Delete a branch. If this is a last note's branch, delete the note as well.

      Parameters

      • OptionaldeleteId: string

        optional delete identified

      • OptionaltaskContext: TaskContext

      Returns boolean

      true if note has been deleted, false otherwise

    • Returns {
          branchId: undefined | string;
          isDeleted: boolean;
          isExpanded: boolean;
          noteId: string;
          notePosition: number;
          parentNoteId: string;
          prefix: null | string;
          utcDateModified: undefined | string;
      }