[@wordpress/dom-ready] add new definitions (#35878)

* [@wordpress/dom-ready] add new definitions

* remove typescript version constraint since this is a simple module
This commit is contained in:
Derek Sifford 2019-06-03 20:46:26 -04:00 committed by Andrew Casey
parent b89e93cc18
commit 05a805867b
4 changed files with 29 additions and 0 deletions

6
types/wordpress__dom-ready/index.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
// Type definitions for @wordpress/dom-ready 2.3
// Project: https://github.com/WordPress/gutenberg/tree/master/packages/dom-ready/README.md
// Definitions by: Derek Sifford <https://github.com/dsifford>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export default function domReady(callback: () => void): void;

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"@wordpress/dom-ready": ["wordpress__dom-ready"]
}
},
"files": ["index.d.ts", "wordpress__dom-ready-tests.ts"]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,3 @@
import domReady from "@wordpress/dom-ready";
domReady(() => void 0);