Skip to content

Commit

Permalink
Added type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
fchasen committed Aug 21, 2018
1 parent 0da286b commit 6bfcd1e
Show file tree
Hide file tree
Showing 50 changed files with 1,837 additions and 54 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
"error",
{ "vars": "all", "args": "none" }
],
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"]
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"valid-jsdoc": ["warn"]
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ books
lib
dist
documentation/html
types/*.js
3 changes: 3 additions & 0 deletions examples/spreads.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@

});




</script>

</body>
Expand Down
136 changes: 132 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Parse and Render Epubs",
"main": "lib/index.js",
"module": "src/index.js",
"types": "types/index.d.ts",
"repository": "https://github.com/futurepress/epub.js",
"directories": {
"test": "test"
Expand Down Expand Up @@ -49,6 +50,7 @@
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.8",
"jsdoc": "^3.5.5",
"jshint": "^2.9.5",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
Expand All @@ -64,6 +66,7 @@
"portfinder": "^1.0.13",
"raw-loader": "^0.5.1",
"serve-static": "^1.13.2",
"tsd-jsdoc": "^2.0.0-beta.6",
"uglify": "^0.1.5",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^1.1.2",
Expand Down
8 changes: 6 additions & 2 deletions src/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ class Contents {
this.observer.observe(this.document, config);
}

imageLoadListeners(target) {
/**
* Test if images are loaded or add listener for when they load
* @private
*/
imageLoadListeners() {
var images = this.document.querySelectorAll("img");
var img;
for (var i = 0; i < images.length; i++) {
Expand All @@ -528,7 +532,7 @@ class Contents {
* Listen for font load and check for resize when loaded
* @private
*/
fontLoadListeners(target) {
fontLoadListeners() {
if (!this.document || !this.document.fonts) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import EventEmitter from "event-emitter";
* Find Locations for a Book
* @param {Spine} spine
* @param {request} request
* @param {number} [pause=100]
*/
class Locations {
constructor(spine, request, pause) {
Expand Down
Loading

0 comments on commit 6bfcd1e

Please sign in to comment.