/** * Get item from file by id * * @async * @template T * @param {string} path - path to file * @param {number} id - item id * @returns {Promise} */ export function getItem(path: string, id: number): Promise; /** * Returns items matching filter function * * @async * @template T * @param {string} path - path to file * @param {(item: T) => boolean} filterFc - filter function * @returns {Promise} */ export function filterItems(path: string, filterFc: (item: T) => boolean): Promise; /** * Update item * * @async * @template T * @param {string} path - path to file * @param {number} id - number of the line (id of the item) * @param {T} item - data to update */ export function updateItem(path: string, id: number, item: T): Promise; /** * Set item to * * @async * @template T * @param {string} path - path to file * @param {number} id - number of the line (id of the item) * @param {T} item - new data to set */ export function setItem(path: string, id: number, item: T): Promise; /** * Delete item (set line to null) * * @async * @param {string} path - path to file * @param {number} id - number of the line (id of the item) */ export function deleteItem(path: string, id: number): Promise; /** * Insert new item * * @async * @template T * @param {string} path - path to file * @param {T} item - new item * @returns {Promise} */ export function insertItem(path: string, item: T): Promise;