server-ts: Remove unnecessary type comments

This commit is contained in:
Elian Doran
2024-04-17 22:35:38 +03:00
parent 17eda952e4
commit 262e4db0f2
8 changed files with 44 additions and 81 deletions

View File

@@ -122,17 +122,14 @@ interface Api {
/**
* This is a powerful search method - you can search by attributes and their values, e.g.:
* "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
*
* @param {string} query
* @param {Object} [searchParams]
*/
searchForNote(query: string, searchParams: SearchParams): BNote | null;
/**
* Retrieves notes with given label name & value
*
* @param name - attribute name
* @param value - attribute value
* @param name - attribute name
* @param value - attribute value
*/
getNotesWithLabel(name: string, value?: string): BNote[];

View File

@@ -69,7 +69,7 @@ class ConsistencyChecks {
childToParents[childNoteId].push(parentNoteId);
}
/** @returns {boolean} true if cycle was found and we should try again */
/** @returns true if cycle was found and we should try again */
const checkTreeCycle = (noteId: string, path: string[]) => {
if (noteId === 'root') {
return false;

View File

@@ -17,8 +17,7 @@ type EventListener = (data: any) => void;
const eventListeners: Record<string, EventListener[]> = {};
/**
* @param {string|string[]}eventTypes - can be either single event or an array of events
* @param listener
* @param eventTypes - can be either single event or an array of events
*/
function subscribe(eventTypes: EventType, listener: EventListener) {
if (!Array.isArray(eventTypes)) {

View File

@@ -323,9 +323,9 @@ export = {
* Get single value from the given query - first column from first returned row.
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @returns [object] - single value
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
* @returns single value
*/
getValue,
@@ -333,9 +333,9 @@ export = {
* Get first returned row.
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @returns {object} - map of column name to column value
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
* @returns - map of column name to column value
*/
getRow,
getRowOrNull,
@@ -344,9 +344,9 @@ export = {
* Get all returned rows.
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @returns {object[]} - array of all rows, each row is a map of column name to column value
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
* @returns - array of all rows, each row is a map of column name to column value
*/
getRows,
getRawRows,
@@ -357,9 +357,9 @@ export = {
* Get a map of first column mapping to second column.
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @returns {object} - map of first column to second column
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
* @returns - map of first column to second column
*/
getMap,
@@ -367,9 +367,9 @@ export = {
* Get a first column in an array.
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @returns {object[]} - array of first column of all returned rows
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
* @returns array of first column of all returned rows
*/
getColumn,
@@ -377,8 +377,8 @@ export = {
* Execute SQL
*
* @method
* @param {string} query - SQL query with ? used as parameter placeholder
* @param {object[]} [params] - array of params if needed
* @param query - SQL query with ? used as parameter placeholder
* @param params - array of params if needed
*/
execute,
executeMany,