diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md index 57820884bb20da..6f7b087c6faacc 100644 --- a/packages/block-editor/README.md +++ b/packages/block-editor/README.md @@ -621,10 +621,6 @@ _Related_ - -_Type_ - -- `Object` - ### storeConfig Block editor data store configuration. @@ -633,10 +629,6 @@ _Related_ - -_Type_ - -- `Object` - ### ToolSelector Undocumented declaration. diff --git a/packages/block-editor/src/store/index.js b/packages/block-editor/src/store/index.js index 2538a469eaf187..a4fc9f5b99a06f 100644 --- a/packages/block-editor/src/store/index.js +++ b/packages/block-editor/src/store/index.js @@ -15,8 +15,6 @@ import { STORE_NAME } from './constants'; * Block editor data store configuration. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore - * - * @type {Object} */ export const storeConfig = { reducer, @@ -28,8 +26,6 @@ export const storeConfig = { * Store definition for the block editor namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore - * - * @type {Object} */ export const store = createReduxStore( STORE_NAME, { ...storeConfig, diff --git a/packages/block-editor/tsconfig.json b/packages/block-editor/tsconfig.json index 66164083969d8b..c2dc4243328b06 100644 --- a/packages/block-editor/tsconfig.json +++ b/packages/block-editor/tsconfig.json @@ -7,7 +7,8 @@ "references": [ { "path": "../deprecated" }, { "path": "../element" }, - { "path": "../hooks" } + { "path": "../hooks" }, + { "path": "../data" } ], // NOTE: This package is being progressively typed. You are encouraged to // expand this array with files which can be type-checked. At some point in diff --git a/packages/compose/src/hooks/use-dialog/index.js b/packages/compose/src/hooks/use-dialog/index.js index be44d4410d0963..a41e8ea9a3a396 100644 --- a/packages/compose/src/hooks/use-dialog/index.js +++ b/packages/compose/src/hooks/use-dialog/index.js @@ -13,13 +13,14 @@ import useFocusReturn from '../use-focus-return'; import useFocusOutside from '../use-focus-outside'; import useMergeRefs from '../use-merge-refs'; -/* eslint-disable jsdoc/valid-types */ +/** + * @typedef {import('../use-focus-on-mount').default} useFocusOnMount + */ /** * @typedef DialogOptions * @property {Parameters[0]} focusOnMount Focus on mount arguments. * @property {() => void} onClose Function to call when the dialog is closed. */ -/* eslint-enable jsdoc/valid-types */ /** * Returns a ref and props to apply to a dialog wrapper to enable the following behaviors: diff --git a/packages/data/tsconfig.json b/packages/data/tsconfig.json index 6f4a0d8f69599d..a1fa8ec23da4be 100644 --- a/packages/data/tsconfig.json +++ b/packages/data/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "rootDir": "src", "declarationDir": "build-types", - "noUnusedParameters": false + "noUnusedParameters": false, + "checkJs": false }, "references": [ { "path": "../compose" }, @@ -17,6 +18,7 @@ "src/redux-store/metadata/**/*", "src/promise-middleware.js", "src/utils", - "src/*.ts" + "src/*.ts", + "src/**/*.js" ] } diff --git a/typings/wordpress__data.d.ts b/typings/wordpress__data.d.ts new file mode 100644 index 00000000000000..c5778a9d870831 --- /dev/null +++ b/typings/wordpress__data.d.ts @@ -0,0 +1,3 @@ +declare module '@wordpress/data' { + export * from '@wordpress/data/build-types/index'; +}