All files / src/libs/Search SearchTerm.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 4/4
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 393x           3x           51x             68x               1x               64x      
import SearchElement from './SearchElement';
 
/**
 * Class representing a search term.
 * This class extends the SearchElement class and is used to handle terms in a search query.
 */
export default class SearchTerm extends SearchElement {
    /**
     * Constructs a new SearchTerm with the given term.
     * @param term - The search term value.
     */
    constructor(term: string) {
        super(term);
    }
 
    /**
     * Gets the term value of the search element.
     */
    public get term(): string {
        return this._value;
    }
 
    /**
     * Sets the term value of the search element.
     * @param value - The new term value to be set.
     */
    public set term(value: string) {
        this._value = value;
    }
 
    /**
     * Determines if the element is an operator.
     * This method overrides the abstract method in the base class.
     */
    public get isOperator(): boolean {
        return false;
    }
}
 
Zur TypeDoc-Dokumentation