-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from krjakbrjak/VNI-docs
Docs
- Loading branch information
Showing
8 changed files
with
76 additions
and
810 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
/** | ||
* Represents the result of the fetch. | ||
*/ | ||
export interface Result<Type> { | ||
/** | ||
* The starting index to fetch the items. | ||
*/ | ||
from: number; | ||
/** | ||
* An array of fetched items. | ||
*/ | ||
items: Array<Type>; | ||
/** | ||
* Total number of items that can be retrieved. | ||
*/ | ||
totalCount: number; | ||
} | ||
|
||
/** | ||
* A callback function to fetch the items. | ||
* | ||
* @typedef {Function} Fetcher | ||
* @template Type - The type of the element to be returned from the function. | ||
* @param {number} index - The strating index to fetch items. | ||
* @param {number} count - The number of items to fetch. | ||
* @returns {Promise<Result<Type>>} - A promise holding the result of the fetch. | ||
*/ | ||
export type Fetcher<Type> = (index: number, count: number) => Promise<Result<Type>>; | ||
|
||
/** | ||
* Represents the style of the item in the table. | ||
*/ | ||
export interface Style { | ||
/** | ||
* Class that will be added to the item when it is hovered. | ||
*/ | ||
hover: string; | ||
/** | ||
* Class that will be added to the item when it is selected. | ||
*/ | ||
select: string; | ||
/** | ||
* Class that will be added to each item. | ||
*/ | ||
item: string; | ||
} |
Oops, something went wrong.