mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[element-ready] add typings (#18778)
This commit is contained in:
committed by
Mohamed Hegazy
parent
371bffbf56
commit
08863b85fc
@@ -0,0 +1,9 @@
|
||||
import elementReady = require('element-ready');
|
||||
|
||||
const p = elementReady('#unicorn');
|
||||
|
||||
p.then(element => {
|
||||
const el: HTMLElement = element;
|
||||
});
|
||||
|
||||
p.cancel();
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// Type definitions for element-ready 2.1
|
||||
// Project: https://github.com/sindresorhus/element-ready#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import pCancelable = require('p-cancelable');
|
||||
|
||||
export = elementReady;
|
||||
|
||||
declare function elementReady(selector: string): pCancelable.PCancelable<HTMLElement>;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"element-ready-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user