From ec5f2999816a061684c09450b8aed7a9301ca79d Mon Sep 17 00:00:00 2001 From: daishi Date: Mon, 13 Nov 2023 22:45:43 +0900 Subject: [PATCH] remove devtools deprecated option --- src/vanilla/utils/devtools.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/vanilla/utils/devtools.ts b/src/vanilla/utils/devtools.ts index 026c8bdb..6eaf6f3c 100644 --- a/src/vanilla/utils/devtools.ts +++ b/src/vanilla/utils/devtools.ts @@ -21,19 +21,6 @@ type Options = { name?: string } & Config -export function devtools( - proxyObject: T, - options?: Options, -): (() => void) | undefined - -/** - * @deprecated Please use { name } option - */ -export function devtools( - proxyObject: T, - name?: string, -): (() => void) | undefined - /** * devtools * @@ -47,14 +34,8 @@ export function devtools( */ export function devtools( proxyObject: T, - options?: Options | string, -) { - if (typeof options === 'string') { - console.warn( - 'string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400', - ) - options = { name: options } - } + options?: Options, +): (() => void) | undefined { const { enabled, name = '', ...rest } = options || {} let extension: (typeof window)['__REDUX_DEVTOOLS_EXTENSION__'] | false