From 170076a453a8c6f4d148baba81830f620381842d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 15 Mar 2023 06:41:43 +0100 Subject: [PATCH] Preferences: Remove `types` field from `package.json` (#49053) * Preferences: Remove `types` field from `package.json` The preferences package does not actually provide any TypeScript types, nor is it written in TypeScript. Adding a `types` field incorrectly declares the opposite. * Fix typing for persistence layer set function --------- Co-authored-by: Daniel Richards --- packages/preferences/package.json | 1 - packages/preferences/src/store/actions.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/preferences/package.json b/packages/preferences/package.json index ba1a95190bb2bc..b51571bc870e51 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -26,7 +26,6 @@ "main": "build/index.js", "module": "build-module/index.js", "react-native": "src/index", - "types": "build-types", "sideEffects": false, "dependencies": { "@babel/runtime": "^7.16.0", diff --git a/packages/preferences/src/store/actions.js b/packages/preferences/src/store/actions.js index 7fcedd49d35297..10b5b45567a7fc 100644 --- a/packages/preferences/src/store/actions.js +++ b/packages/preferences/src/store/actions.js @@ -49,12 +49,12 @@ export function setDefaults( scope, defaults ) { } /** @typedef {() => Promise} WPPreferencesPersistenceLayerGet */ -/** @typedef {(*) => void} WPPreferencesPersistenceLayerSet */ +/** @typedef {(Object) => void} WPPreferencesPersistenceLayerSet */ /** * @typedef WPPreferencesPersistenceLayer * * @property {WPPreferencesPersistenceLayerGet} get An async function that gets data from the persistence layer. - * @property {WPPreferencesPersistenceLayerSet} set A function that sets data in the persistence layer. + * @property {WPPreferencesPersistenceLayerSet} set A function that sets data in the persistence layer. */ /**