Comparing version 1.1.0 to 1.2.0
/** | ||
* Check when the DOM is loaded like [`DOMContentLoaded`](https://developer.mozilla.org/en/docs/Web/Events/DOMContentLoaded). | ||
*/ | ||
declare const domLoaded: Promise<void>; | ||
Check when the DOM is loaded like [`DOMContentLoaded`](https://developer.mozilla.org/en/docs/Web/Events/DOMContentLoaded). | ||
export default domLoaded; | ||
@example | ||
``` | ||
import domLoaded = require('dom-loaded'); | ||
(async () => { | ||
await domLoaded; | ||
console.log('DOM is loaded'); | ||
})(); | ||
``` | ||
*/ | ||
declare const domLoaded: Promise<void> & { | ||
// TODO: remove this in the next major version | ||
default: typeof domLoaded; | ||
}; | ||
export = domLoaded; |
@@ -18,2 +18,3 @@ 'use strict'; | ||
module.exports = domLoaded; | ||
// TODO: remove this in the next major version | ||
module.exports.default = domLoaded; |
{ | ||
"name": "dom-loaded", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Check when the DOM is loaded like `DOMContentLoaded`", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -36,5 +36,5 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"ava": "^1.4.1", | ||
"jsdom": "^14.0.0", | ||
"tsd-check": "^0.3.0", | ||
"tsd": "^0.7.1", | ||
"xo": "^0.24.0" | ||
@@ -41,0 +41,0 @@ }, |
@@ -23,3 +23,3 @@ # dom-loaded [![Build Status](https://travis-ci.org/sindresorhus/dom-loaded.svg?branch=master)](https://travis-ci.org/sindresorhus/dom-loaded) | ||
console.log('DOM is loaded'); | ||
})(): | ||
})(); | ||
``` | ||
@@ -26,0 +26,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3369
33