Skip to content

Commit

Permalink
Create typescript definition file
Browse files Browse the repository at this point in the history
  • Loading branch information
carlsonsantana committed Aug 9, 2023
1 parent 953afa1 commit 7a0caf3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module jepub {
export default class jEpub {
init(parameters: any): void;
date(date: Date): void;
uuid(id: string | number): void;
cover(data: Blob | ArrayBuffer): void;
image(data: Blob | ArrayBuffer, IMG_ID: string): void;
notes(content: string): void;
add(title: string, content: string | Array<string>, index?: number): void;
generate(type?: string, onUpdate?: (metadata: any) => void): Promise<Blob>;
static html2text(html: string, noBr: boolean): Promise<Blob>;
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"url": "https://github.com/lelinhtinh/jEpub/issues"
},
"homepage": "https://lelinhtinh.github.io/jEpub/",
"types": "index.d.ts",
"dependencies": {
"ejs": "^3.1.7",
"image-type": "^4.1.0",
Expand Down

0 comments on commit 7a0caf3

Please sign in to comment.