Initial commit andmodule declaration file
This commit is contained in:
commit
a1b47a38cc
22
html-pagination.d.ts
vendored
Normal file
22
html-pagination.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
export abstract class CacheInterface {
|
||||
abstract g(key: string): string;
|
||||
abstract s(key: string, value: string): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get page with specific number
|
||||
* @param n Page number
|
||||
*/
|
||||
declare function getPage(n: number): string;
|
||||
|
||||
/**
|
||||
* Function to prepare unific data and compose page content getting function
|
||||
* @param content HTML element with html content to display paginationly
|
||||
* @param container HTML element which will store content to display
|
||||
* @param cache Class implementing `g` and `s` methods for getting and setting elements of KV storage
|
||||
*/
|
||||
export function setup(
|
||||
content: HTMLElement,
|
||||
container: HTMLElement,
|
||||
cache: CacheInterface
|
||||
): typeof getPage;
|
23
package.json
Normal file
23
package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "html-pagination",
|
||||
"version": "1.0.0",
|
||||
"description": "Package for html document pagination to fit container with fixed width",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dm1sh/html-pagination.git"
|
||||
},
|
||||
"keywords": [
|
||||
"pagination",
|
||||
"books"
|
||||
],
|
||||
"author": "dm1sh",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dm1sh/html-pagination/issues"
|
||||
},
|
||||
"homepage": "https://github.com/dm1sh/html-pagination#readme"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user