document-promises: Provides its own types (#39626)

This commit is contained in:
Alexander T
2019-10-29 15:09:02 -07:00
committed by Jesse Trinity
parent 4e8b0811f3
commit d3197b0554
5 changed files with 6 additions and 63 deletions
+6
View File
@@ -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
});
-23
View File
@@ -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>;
-23
View File
@@ -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
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }