diff --git a/types/wordpress__dom-ready/index.d.ts b/types/wordpress__dom-ready/index.d.ts new file mode 100644 index 0000000000..cd3fbf9009 --- /dev/null +++ b/types/wordpress__dom-ready/index.d.ts @@ -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 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function domReady(callback: () => void): void; diff --git a/types/wordpress__dom-ready/tsconfig.json b/types/wordpress__dom-ready/tsconfig.json new file mode 100644 index 0000000000..bd70e8432b --- /dev/null +++ b/types/wordpress__dom-ready/tsconfig.json @@ -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"] +} diff --git a/types/wordpress__dom-ready/tslint.json b/types/wordpress__dom-ready/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/wordpress__dom-ready/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/wordpress__dom-ready/wordpress__dom-ready-tests.ts b/types/wordpress__dom-ready/wordpress__dom-ready-tests.ts new file mode 100644 index 0000000000..b1d707d6db --- /dev/null +++ b/types/wordpress__dom-ready/wordpress__dom-ready-tests.ts @@ -0,0 +1,3 @@ +import domReady from "@wordpress/dom-ready"; + +domReady(() => void 0);