mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
document-promises: Provides its own types (#39626)
This commit is contained in:
committed by
Jesse Trinity
parent
4e8b0811f3
commit
d3197b0554
@@ -822,6 +822,12 @@
|
||||
"sourceRepoURL": "https://github.com/joyent/docker-file-parser",
|
||||
"asOfVersion": "1.0.3"
|
||||
},
|
||||
{
|
||||
"libraryName": "document-promises",
|
||||
"typingsPackageName": "document-promises",
|
||||
"sourceRepoURL": "https://github.com/jonathantneal/document-promises#readme",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "dom-helpers",
|
||||
"typingsPackageName": "dom-helpers",
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import { parsed, contentLoaded, loaded } from 'document-promises';
|
||||
|
||||
let promise: Promise<void>;
|
||||
promise = parsed;
|
||||
promise = contentLoaded;
|
||||
promise = loaded;
|
||||
|
||||
parsed.then(() => {
|
||||
// Document parsed
|
||||
});
|
||||
contentLoaded.then(() => {
|
||||
// Document is ready
|
||||
});
|
||||
loaded.then(() => {
|
||||
// Document loaded
|
||||
});
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
// Type definitions for document-promises 3.1
|
||||
// Project: https://github.com/jonathantneal/document-promises#readme
|
||||
// Definitions by: Tiger Oakes <https://github.com/NotWoods>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* document.parsed is a promise that fulfills when the document is parsed
|
||||
* and `readyState` is `interactive`, before deferred and async scripts have run.
|
||||
*/
|
||||
export const parsed: Promise<void>;
|
||||
|
||||
/**
|
||||
* document.contentLoaded is a promise that fulfills when the document is
|
||||
* parsed, blocking scripts have completed, and `DOMContentLoaded` fires.
|
||||
*/
|
||||
export const contentLoaded: Promise<void>;
|
||||
|
||||
/**
|
||||
* document.loaded is a promise that fulfills when the document is parsed,
|
||||
* blocking scripts have completed, images, scripts, links and sub-frames
|
||||
* have finished loading, and `readyState` is `complete`.
|
||||
*/
|
||||
export const loaded: Promise<void>;
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"document-promises-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user